[SOLVED] Changing the order in which Pages are added

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
F80
New Member
New Member
Posts: 7
Joined: Mon Sep 06, 2010 10:02 am

[SOLVED] Changing the order in which Pages are added

Post 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...
Last edited by F80 on Thu Sep 09, 2010 9:54 am, edited 1 time in total.
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am
Location: Arizona

Re: Changing the order in which Pages are added

Post by Dr.CSS »

The simplest way would be to add the page then hit the Reorder Pages button and move the page up...
F80
New Member
New Member
Posts: 7
Joined: Mon Sep 06, 2010 10:02 am

Re: Changing the order in which Pages are added

Post 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.
alby

Re: Changing the order in which Pages are added

Post by alby »

Try in your menu template
.....
{foreach from=$nodelist|@array_reverse item=node}
.....
Alby
F80
New Member
New Member
Posts: 7
Joined: Mon Sep 06, 2010 10:02 am

Re: Changing the order in which Pages are added

Post 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!
F80
New Member
New Member
Posts: 7
Joined: Mon Sep 06, 2010 10:02 am

Re: Changing the order in which Pages are added

Post 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!
Post Reply

Return to “CMSMS Core”