DRY: Template Layouts is nice because of the single layout tag.

{layout:set:append name='url'}{path='page1'}{/layout:set:append}
{layout:set:append name='url'}{path='page1/page2'}{/layout:set:append}

{layout:set:append name="title"}test1{/layout:set:append}
{layout:set:append name="title"}test2{/layout:set:append}

    <li><a href="{value}">{layout:title index='{index}'}</a></li>

The result will be:

<ul >
  <li><a href="http://mysite/page1">test1</a></li>
  <li><a href="http://mysite/page1/page2">test2</a></li>

It is possible to obtain the same result using Stash (if I'm not using yet EE4) ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.