I have a section called "CustomTileSection" which is having some set of components (let's say 8 components but the number of components is not static and it is dynamic). I need to show the component in Spartacus. How can I get the data which is there for every component to iterate and show it in UI?
SAP Spartacus How to show the custom components which is inside section
1.7k views Asked by Selva Ajitha At
1
Each CMS Page Slot can contain dynamic amount of CMS Components, to show the slot with CMS Components inside you should:
More details here https://sap.github.io/spartacus-docs/page-layout/.
typeCode
:More here https://sap.github.io/spartacus-docs/customizing-cms-components/.
CmsComponentData
service from AngularComponent's constructor:Additional details here https://sap.github.io/spartacus-docs/customizing-cms-components/#accessing-cms-data-in-cms-components.
Please note, that if all CMS Component have the same
typeCode
you need to map it only once, all another work Spartacus makes by self.