V
V
Vladimir2017-09-20 16:43:33
Yii
Vladimir, 2017-09-20 16:43:33

How to use a piece of code in multiple Yii2 templates?

Good day! I have 4 templates (layouts) and there is a piece of code that is in all 4 templates, tell me how can I include this piece in all 4 templates? I tried something with beginContent but I can't figure out how it works. Give an example if possible. Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Greg Popov, 2017-09-20
@MasterGerold

Demolish in partials and render in every layout

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question