Templates
Templates let you change the structure and appearance of your project without changing its source code. You can describe components in your project's code in advance and mark them with templates created in OneEntry. They can differ in design, behavior, and so on. By switching templates, you can change how your entities work, whether it's a page, block, form, or something else.
To work with templates, open the "Settings" section and go to the "Templates" subsection. It contains the list of existing templates and a form for creating new ones.
Creation
In the creation form, specify:
- Name: a non-unique string.
- Marker: a unique string.
- Type: the type of entity, selected from the list, that the template can be applied to.
Then click "Create".
Types
Templates differ by the type of entity they can be added to.
In the Type list, types are grouped by module. The following types are available:
- Common block: a regular block
- Product block: a product block
- Similar products block: a block of similar products
- Similar Products to Cart Block: a block of products similar to those in the cart
- Similar Products to Wishlist Block: a block of products similar to those in favorites
- Cart Complement Block: a block of products that complement the cart
- Repeat Purchase Block: a repeat purchase block
- Frequently ordered products block: a block of frequently ordered products
- Trending Products Block: a block of trending products
- Recently Viewed Block: a block of recently viewed products
- Personal Recommendations Block: a block of personal recommendations
- Slider: a slider
- Common page: a regular page
- Catalog page: a catalog page
- Product: a product page
- Product preview: a product preview
- External page: an external page
- Error page: an error page
- Form: a form
- Discount: a discount
Settings
In the list of templates, find the one you want to configure and click the gear icon to open it for editing.
You can change:
- Name: a non-unique string.
- Marker: a unique string.
- Type: the type of entity, selected from the list, that the template can be applied to.
- Selecting a set of attributes: the template's attribute set. Every new entity with this template gets the values filled in the set's fields (see the "Attribute Templates" section on the Actions with Attribute Sets page).
Deletion
In the list of templates, find the one you want to delete and click the delete icon . Confirm the action in the dialog box.