Is there way to sort $node->menutext for the main menus? in code $node->menutext appears as childs (sub sections) of the main menu links. I would like to sort $node->menutext alphabetically, which i know will effect every drop down list.
Thanks!
bh
how to sort $node->menutext?
how to sort $node->menutext?
Last edited by blackhawk on Fri Mar 06, 2009 5:15 pm, edited 1 time in total.
Re: how to sort $node->menutext?
smarty's modifier.sort.php looks like it will work but how to we extract the keys from the node->menutext to load into a foreach loop? In other words what are we sorting by.
thanks!
thanks!
Last edited by blackhawk on Fri Mar 06, 2009 5:18 pm, edited 1 time in total.
Re: how to sort $node->menutext?
ok so this is what i got so far my menu
My apologizes, just learned that $node->menutext is an item of $nodelist. Which still leads me to question how to sort $nodelist if it's depth is greater than 1.
Thanks!
Code: Select all
{if $node->depth == '1'}<span>{$node->menutext}</span>
{else}
{foreach from=$node->menutext item=subnavitem}
{$subnavitem}
{/foreach}
{* I want to use this in my foreach statment but dont know the value to place after sortby |@sortby:??? *}
{/if}
Thanks!
Last edited by blackhawk on Fri Mar 06, 2009 5:48 pm, edited 1 time in total.
Re: how to sort $node->menutext?
Where do you find this modifier? It's not provided by default ...blackhawk wrote: smarty's modifier.sort.php looks like it will work
But you can use some php command like a modifer
Code: Select all
{foreach from=$node->menutext|sort item=subnavitem}
{$subnavitem}
{/foreach}