J
J
Jesse Pinkman2021-01-14 16:02:13
Twig
Jesse Pinkman, 2021-01-14 16:02:13

How to add a template?

There is a file container.twig
with content

<div class="conatiner">
     <div class="content">
        //тут вывести 
     </div>
</div>


I need to call the .container template in another file and display something inside .content

For example, on one page I need to display the container.twig template and include file1.twig and file2.twig in .content and only file3.twig on another page so that ended up looking like this:



<div class="conatiner">
     <div class="content">
          Контент file1.twig

          Контент file2.twig

           Или что угодно
     </div>
</div>

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question