Pass a Layout View to a Content Layout

When you develop a content layout, you can get at properties for the underlying component if the content layout is being used in sites.

For this specific use case, you can get at the content layout view chosen for the content type in a content list. Then you can alter the way the component renders depending on what the category is. Without access to this property, you would need to create two content layouts that are effectively the same.

The contentLayoutCategory property is available for content layouts rendered for both the content item and the content list components. You can access this property through the Sites SDK, as follows.

scsData.SitesSDK.getProperty('contentLayoutCategory', function (layoutCategory)
          { console.log(layoutCategory);});

See the Oracle Content and Experience SDKs.

This property is available only when the content layout is being rendered from a content item or content list, which are in an Oracle Content and Experience site. It isn't available when the content layout is rendered from a third-party app.