4 Replies Latest reply on May 29, 2016 5:43 AM by Carla@home

    How to structure directory and using correct syntax when using liquid templates and "include"

    Carla@home Level 2

      Hi,

       

      I've the following question on how to structure my directory when I want to make use of liquid templates with "include"

       

      If I place i.g this code on a liquid template "layout-test.tpl"

       

      {% include 'header' %}

        <section>

        {% block content %}{% endblock %}

        </section>

        {% include 'footer' %}

       

      The templates renders without the includes. (On my desktop its works ok, because the code compiles through a "interpreter" and will be shown in plain HTML.)

       

      The directories look like this (within the developer  section of the admin console):

       

      Layouts

      ---Custom

      ---------includes

      ...............header.liquid

      ...............footer.liquid

      ---------templates

      ...............layout-test.tpl

       

      Obviously there's something wrong with my code to work in BC.

      The main question is, what is the correct syntax to make it work?

       

      Thanks,

      Kind regards,

      Carla