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 acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.