Menus: Smarty Modifier to Reverse Sort Arrays

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
Andrew Prior
Forum Members
Forum Members
Posts: 247
Joined: Sun Oct 28, 2007 4:14 am

Menus: Smarty Modifier to Reverse Sort Arrays

Post 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
Bigge

Re: Menus: Smarty Modifier to Reverse Sort Arrays

Post by Bigge »

I have no answer, but same need!
Hopefully someone with skills have an answer...
Post Reply

Return to “CMSMS Core”