Page 1 of 1

[SOLVED] Changing the order in which Pages are added

Posted: Mon Sep 06, 2010 10:39 am
by F80
Hi all,

I am trying to redo a site that is written entirely using HTML, CSS and PHP in CMSMS.
I'm still new to CMSMS, so I figure out a lot of things using the Search function in this forum, but now I have encountered an issue which I haven't found the answer to here.

In the original: if the admin created a new article, he'd put the name and link of the page on top of the others, such as this:

MENU
  • Item 3
  • Item 2
  • Item 1
I tried to achieve the same situation in CMSMS. As you all know, if you add a new page there it comes below the others. I was wondering if there is any way to get the same results in CMSMS.
The reason I use Pages instead of the News module, is that they have to appear in the menu. And because they are not frequently updated (and more meant for casual reading), the choice of putting new pages on top in the menu is preferred.

Thanks in advance...

Re: Changing the order in which Pages are added

Posted: Mon Sep 06, 2010 6:28 pm
by Dr.CSS
The simplest way would be to add the page then hit the Reorder Pages button and move the page up...

Re: Changing the order in which Pages are added

Posted: Tue Sep 07, 2010 7:04 am
by F80
I know and that's for now the way to do it, but the site already has 25 pages and 25 menu-items...
So to manually do that every time eventually becomes a bit of a hassle, that's why I wondered if there was a better way to do that.

Re: Changing the order in which Pages are added

Posted: Tue Sep 07, 2010 11:06 am
by alby
Try in your menu template
.....
{foreach from=$nodelist|@array_reverse item=node}
.....
Alby

Re: Changing the order in which Pages are added

Posted: Tue Sep 07, 2010 1:00 pm
by F80
Thank you for the tip,

I played around with it for a bit and it works fine, except that I can't find a way to make it work without leaving one item (the "Home" item) just on top of the others. I'm sure it's possible, I'm just not that pro with Smarty yet ;)

But thanks again for helping me out!

Re: Changing the order in which Pages are added

Posted: Thu Sep 09, 2010 9:26 am
by F80
I found the way, it's fairly simple if you think about it...

Alby's solution worked, you just have to mark the home page to not show up in the menu.
Then you can hardcode the link in the template (Templates > Layout) above the menu.

Thanks everyone!