I just watched a tutorial on how to sort News items, and I thought - "maybe I could apply this to my menu". Currently, my menu is in disarray, it needs sorting into some sensible order.
Currently I have..
Home | Contact Us | Site Map | News | About Us
If I wish to rearrange this, could I not edit the Xslt file and add the following?
pageWeight is a custom Property I have created which is numeric. I assigned the following
Home = 1
About Us = 2
News = 3 etc etc
but my menu remains in the same order, have I just got the logic confused, is this even possible to do?
You can also sort menu items (nodes) via the Umbraco GUI. Right click on your content / home node and select Sort! Then you can drag-drop to arrange the order. Easy!
Page weighting (aka sorting navigation menu)
Hi guys,
I just watched a tutorial on how to sort News items, and I thought - "maybe I could apply this to my menu". Currently, my menu is in disarray, it needs sorting into some sensible order.
Currently I have..
Home | Contact Us | Site Map | News | About Us
If I wish to rearrange this, could I not edit the Xslt file and add the following?
pageWeight is a custom Property I have created which is numeric. I assigned the following
Home = 1
About Us = 2
News = 3 etc etc
but my menu remains in the same order, have I just got the logic confused, is this even possible to do?
Regards, Garry.
Hi Garry,
Change
[code] [/code]
into
[code] [/code]
pageWeigth is a custom property and therefore always wrapped in a node...
Hope this helps,
/Dirk
Brilliant, thanks very much. Is this the normal way to sort a menu or is there built in functionality?
Garry,
You can also sort menu items (nodes) via the Umbraco GUI. Right click on your content / home node and select Sort! Then you can drag-drop to arrange the order. Easy!
Lesley
[quote=Dirk]
[code] [/code]
[/quote]
Actually, since page-weight is numeric you will probably need to specifiy the data-type as "number" get the sorting working as you would expect:
[code] [/code]
If you don't specify the data-type then the sort would be text, which wouldn't work once you had numbers greater than 9!
is working on a reply...