N
N
Nikita Reshetnyak2020-07-06 14:47:54
Twig
Nikita Reshetnyak, 2020-07-06 14:47:54

How to change the data in the block of the imported parent template?

Good day!
Such a structure content.twig is inherited from base.twig includes left.twig

left.twig has a block
{% block pageContent %}


{% endblock %}
How to change the data in it, googling unfortunately does not help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BoShurik, 2020-07-06
@trjflash

In the version you described, this is not possible.
You will have to, firstly, output all your includes (well, or only those where you need the ability to change blocks) into separate blocks, and secondly, you will have to use the embed tag instead of include . https://twigfiddle.com/rxgc61

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question