Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Garry Bain 149 posts 124 karma points
    Jan 21, 2009 @ 14:07
    Garry Bain
    0

    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.

  • Dirk De Grave 4541 posts 6021 karma points MVP 3x admin c-trib
    Jan 21, 2009 @ 14:10
    Dirk De Grave
    0

    Hi Garry,

    Change

    [code] [/code]

    into

    [code] [/code]

    pageWeigth is a custom property and therefore always wrapped in a node...

    Hope this helps,

    /Dirk

  • Garry Bain 149 posts 124 karma points
    Jan 21, 2009 @ 14:13
    Garry Bain
    0

    Brilliant, thanks very much. Is this the normal way to sort a menu or is there built in functionality?

  • Lesley 284 posts 143 karma points
    Jan 21, 2009 @ 14:34
    Lesley
    0

    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

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jan 24, 2009 @ 18:37
    Dan Diplo
    0

    [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!

Please Sign in or register to post replies

Write your reply to:

Draft