top | item 38600857

(no title)

shhsshs | 2 years ago

That is not quite a true "slot" behavior because the containing pages have to have a reference to the main layout via `{{ define "main" }}`

discuss

order

ckdot2|2 years ago

You're right. But this only means that it won't be possible that you use the same template for different slots. Personally, I don't remember I ever needed that. Actually, most template engines I know work this way (https://twig.symfony.com/doc/2.x/templates.html#template-inh..., "{% block content %}"). But still, it's easy to archieve that by just creating another sub template. So your first template file is the layout, the second one contains the main block definition, and that definition you just include another sub template which can be reused elsewhere.