Extend content collections
By default, users can only add content items to content collections. However, as a superuser, you can extend content collections to work with other entity definitions.
To configure Content Hub, you must either be a superuser or have the necessary permissions granted to you through user group policies.
In this configuration example, you extend content collections to add products, including:
Add existing products
To allow adding new products to content collections, you must:
-
Create a relation between content collections and products.
-
Edit the search component of the Content collection details page.
-
Edit the creation component of the Content collection details page.
Create a relation
To create a relation between content collections and products, follow the procedure to add a relation. Make sure to enter the following parameters:
Where |
Desired field value |
---|---|
Page name |
M.ContentCollection |
Name in New member group dialog box |
Product |
New member dialog box |
In RELATION, click Select and fill in the following fields:
|
When you have done this, click Save and Apply changes.
Edit the search component
To allow the Content search component to find M.PCM.Product entities, you must:
-
Edit the filters to include M.PCM.Product.
-
Edit the output to include the desired product fields in the grid view.
-
Make the same changes to the Add existing items component.
Filters
To edit the filters of the Content search component, follow this procedure. Make sure to enter the following parameters:
Where |
Desired field value |
---|---|
Page name |
Content collection details |
In Filters, on the System tab |
Change the combine operator from and to or |
Add filter |
Select the Product (M.PCM.Product) definition |
Fixed tab |
Fill in the following fields:
|
The * symbol is a wildcard. It filters dynamic data related to content collections. In this case, it filters the ContentCollectionsToPCM and ContentCollectionToContent members.
In the final step, change the Filter type back to Relation and click Save.
Output
To edit the output of the Content search component:
-
On the Content search component page, click the Output tab.
-
To edit the product grid view, click Grid and click the M.PCM.Product block.
-
To add the desired fields, scroll down to Fields and click Add .
-
Click Save.
The grid view is the default view to display content with thumbnails.
Edit the Add existing items component
Now, make changes to the filters and output of the Add existing items component as follows:
-
On the Content collection details page, on the Add existing items component, click the switch to enable custom settings.
-
Click the Add existing items component.
-
In Filters, on the System tab, click Edit and change the combine operator from and to or.
-
To confirm your change, click Save.
-
On the Output tab, click Grid and then click the M.PCM.Product block.
-
To add the desired fields, scroll down to Fields and click Add .
-
Click Save.
Edit the creation component
To allow the Creation component to link existing products to content collections:
-
On the Content collection details page, on the Creation component, click the switch to enable custom settings.
-
Click the Creation component.
-
Click Link items, and then click Add definition.
-
In the drop-down list, select the ContentCollectionsToPCM relation.
-
Click Save.
-
Click the General section.
-
Add a label, either a Default or Custom option.
-
In Linked search component, select Content search and Add existing items.
-
Click Save and close.
Add new products
To allow adding new products to content collections:
-
On the menu bar, click Manage .
-
Click Pages and find the Content collection details page.
-
On the Creation component, click the switch to enable custom settings.
-
Click the Creation component.
-
Click New entities, and then click Add definition.
-
In the drop-down list, select M.PCM.Product.
-
Fill in the fields as follows:
-
Label type: Default or Custom. Here, you select Default.
-
Detail Page: here, you select Product creation (the template page for the creation of a new product).
-
Window type: defines the size of the dialog box used for product creation (Medium modal is the default):
-
-
Under DEFAULT VALUES, click Add value.
-
In the two drop-down lists, click ContentCollectionsToPCM* and Current entity respectively.
-
To confirm your changes, in the bottom-right of the screen, click Save.
-
In the top-right of the screen, click Save or Save and close.
TipTo remove, edit, or delete products from a content collection, edit the Selection component to define operations for M.PCM.Product.