We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13993
    • 100 Posts
    I have a site. It has a document tree like any other, but for some pages I want a different menu both up top and on the side. I began by creating a separate template for each page / menu type but since the templates are all the same but for 2 class names and the menu link, there has to be an easier way.

    I am assuming that Template Variables would be the choice of a fix, but I’m not sure I understand how to do it. Anyone have an example of maybe 2 different links being pulled based on a TV? If not, what would I use to do it?
      • 28042 ā˜† A M B ā˜†
      • 24,524 Posts
      Use a TV to contain the menu snippet call. Have the default value of the TV be the usual menu snippet. Then edit the pages you want to have different menu snippets.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
        • 24421
        • 44 Posts
        I do that changing only the class name in the body tag (i.e.: <body class="special_menu">) then you only need to create the apropiate CSS for your special menu like:

        body #special_menu #other_child .... ul li { and here the apropiate CSS sentences...}

        Hope this help,
        Ramon