We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 33114
    • 518 Posts
    I recently had an urgent need for DropMenu to show some items on my sitemap, wich are not shown in general nav menu. I think this is a very normal need. And unfortunately I haven’t found any parameters regarding filtering such items off.

    Here’s what is to be done:
    If you are lazy - just duplicate DropMenu snippet and use the first to dispplay the general nav menu and the duplicate to show the sitemap. Next change the following line in your sitemap DropMenu:
    $children = array_filter($children, "filterHidden");

    to
    //$children = array_filter($children, "filterHidden");

    this will switch off filtering

    and as the sitemap and nav menu on onepage will make a "multicall", and your nav menu will show the same unfiltered items, change this also:
    global $MakeMap_Defined;
    to
    //global $MakeMap_Defined;
    When you load the sitemap page for the first time then - it’ll display an error message, but when you reload - it’ll be cached and everyboy is gonna see a fine sitemap from then ... I know this is a savage solution as I’m no php guru.

    If you are not lazy - add some code to make such a switch as a parameter smiley

    PS. I was the lazy one smiley
      http://modx.ru - российская поддержка MODx
      http://newscup.ru - экспериментальный проект
      http://yentsun.com - персональный сайт
      • 16610
      • 634 Posts
      Thanks yentsun for sharing the information. This is just the feature I was looking for to implement. Fortunately searched first the forums if someone had already done it smiley
        Mikko Lammi, Owner at Maagit