Page 1 of 1

Menus: Smarty Modifier to Reverse Sort Arrays

Posted: Mon Feb 09, 2009 5:49 am
by Andrew Prior
Nullig posted some excellent code at http://forum.cmsmadesimple.org/index.php?topic=22370.0
but it only deals with single level menus.

So a menu like
Level One
Level Two
Level Three
can be changed to
Level Three
Level Two
Level One
using this technique.

But say I have
Level One
Level Two
    A
    B
    C
Level Three
My Level Two gets many many additions, so I want the newest posts to appear at the top, not the bottom.

That is, I want
Level One
Level Two
    C
    B
    A
Level Three
Nullig's method will give me
Level Three
Level Two
    C
    B
    A
Level One
Can anyone tell me how to resort the array on just the one level. It's well outside my knowledge
Many thanks
Andrew Prior

Re: Menus: Smarty Modifier to Reverse Sort Arrays

Posted: Tue Feb 10, 2009 9:01 am
by Bigge
I have no answer, but same need!
Hopefully someone with skills have an answer...