Template Elements

Template elements are HTML elements that will be duplicated for each entry in a Strapi collection, relation or repeatable field (components, media, etc…).

These elements contain field elements, and are descendants of collection elements, relation elements or repeatable elements. Template elements are defined with the strapi-template attribute.

Multiple templates can be created and chosen dynamically based on the data in Strapi using strapi-template-conditional

Template elements also add a strapi-template-id attribute which can be used in cases where you need to fetch data directly from the Strapi API.

Attributes

strapi-template, strapi-template-conditional