Adding template layouts to item types

6.0/10 rating (1 votes)

As you might have noticed, some item types have more template layouts than others. In this article we'll describe how to add more templates to the item type of your choice.

In this example we'll be adding "Favorite" template to the "Demo element" item type.

  1. In the folder
    copy favorite.php to the "demo-elements" folder.

    Copying layout

  2. Open
    and add this code to "metadata":

    <layout name="favorite">
       <description>Layout for element favorite</description>
  3. Open
    and add this code to "renderer":

    <positions layout="favorite">
       <position name="title">Title</position>
       <position name="image">Image</position>
       <position name="properties">Properties</position>
       <position name="text">Text</position>
       <position name="meta">Meta</position>

    You can change or add new positions but be sure to accordingly edit favorite.php in order to include new positions there.

  4. After this, configure your new template layout like any other:

    Click on its name

    Opening item template layout for editing

    Add needed elements to their positions

    Configuring item template layout


Still gotta questions, who can help me?

Visit our special JBZoo tech support forum which is specifically meant for JBZoo so the priority of the response and its promptness are much better there than in any other place. With inactive account with a “Plus” sign in a tariff plan you can ask for support in one of these sections or use any of our contacts.