-
☆ A M B ☆
- 209 Posts
I’m using WayFinder to generate a second-level navigation menu. The snippet is embedded in a chunk called ’PageFooter’ which is included in every template.
For most pages the "sort by menuindex" works perfectly, however for certain sections I need to sort by pagetitle instead. Is there a mechanism to set variables in (for example) a template? For example
Template file...
[[SetVar &name=`sortorder` &value=`pagetitle`]]
{{PageFooter}}
// In chunk PageFooter
[!Wayfinder? &startId=`[[UltimateParent? &topLevel=`1`]]` &hideSubMenus=`TRUE` &displayStart=`TRUE` &outerTpl=`sidebar.outerTpl` &sortBy=`[*sortorder*]` &rowTpl=`main.rowTpl` &innerTpl=`main.innerTpl` &startItemTpl=`sidebar.startItemTpl`!]
The alternative is to embed the Wayfinder call into my templates, but that violates DRY