Slot Parsing
This will look for HTML-elements with the attribute data-fcecom-slot-name
and will extend the DOM based on whether or not content exists in the CaaS for the current element.
When there is no content at all for the given element yet (i.e. no page exists in FirstSpirit for the given element ID), the slots will be filled with "Add content" buttons allowing the user to add content to the slots. Clicking the buttons will create a corresponding page in FirstSpirit and create a section within the selected slot afterwards.
When there is an entry within the CaaS already, the data-preview-id
attributes required by TPP will be set. This will cause the Content Creator to render its outline and edit buttons.
const pageResult = api.setPage({
fsPageTemplate: 'product', // (1)
id: 'Product Page', // (2)
type: 'product', // (3)
displayNames: { // (4)
EN: 'Product name EN',
DE: 'Product name DE',
},
locale: 'en_GB', // (5)
ensureExistence: true // (6)
});
- FirstSpirit page template uid - will be used when the page has to be created when adding content
- ID from shop system
- Page type (product, category or content)
- Display names for various languages - will be used when the page has to be created when adding content
- The current locale
- If the page does not exist, it can be created. For this to work, the pageTarget has to be a representation of a shop-driven page.
Last update:
May 19, 2025