Overview
Component Templates are one of the many levels of templating available in Ondexx, and can be used to expedite the process of creating content and pages.
Content can be placed inside a component template, which can in turn be attached to a Page Component. When a Page Component that contains a Component Template is added to a page, it will contain the content of the template.
If your site has components that always contain similar or standardized content, such as standard tables or boilerplate content, adding a Component Template to that component will streamline the process of creating your pages.
Component Templates can be managed from the Component Template Manager, and added to Page Components from the Page Component Manager. These menus can be found under Administration > Content Manager > Component Templates or Components
NOTE
Component Template content is not retroactively added to Page Component already in pages – it is only the “starting content” when a component is initially.
Creating and Managing Component Templates
Component Templates can be created and managed from the Component Template Manager. This can be found under Administration > Content Management > Component Templates. It can also be accessed from the Component Manager with the Go to template manager button.
The Component Template Manager shows a list of all created Component Templates within a site, along with how many Page Components currently use each template.
From here, we have the option to Edit or Delete an existing template, or create a new template. Note that templates can only be deleted if they are not in use by any components.
To create a new Component Template, click the + Add Template button. This will open the Component Template editor.
Editing Component Templates
The Component Template editor is made up of two fields, Template Name and Template Content.
The Template Name is used to identify the template, and only appears when managing the template, or adding it to Page Components.
The Template Content is the content that will be automatically added to components with this template. This field utilizes the standard content editor used throughout Ondexx – simply create whatever content you need.
Adding and Removing Templates from Page Component
Component Templates need to be added to Page Components to take effect. This can be done from the Page Component Manager. This can be found under Administration > Content Management > Components, or by clicking the Go to Component Manager button in the Component Template Manager.
For more information on using Page Components, refer to this help article.
To add a Component Template to a Page Component…
- Click the Edit button in the row of the component to which you would like to add a template.
- To add a template, select the template you would like to attach from the Component Template dropdown. The content of the selected template will be previewed under Component Template Preview.
- To remove a template, select “–None Selected–” in the Component Template dropdown.
- Click SAVE. Your template change has now been applied to the component.