We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19029
    • 10 Posts
    Ok, I’m trying to convert a static site into MODx. If I am understanding things correctly, the menu would have to be a Snippet?

    Here is the site: http://www.belamari.com/main.html

    I am trying to convert the menu on the left to a Snippet. Can I just copy the code for it and past it in MODx as a Snippet or is there more code that needs to be added for it to work?
    • Best way to learn will be to install the demo site content and see how it builds the menus dynamically. However, in the case of a graphical menu like yours, it’s probalby best to hand-code it into your template, or use a Chunk if you have more than one template that uses the same navigation.

      Hope this helps!
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 19029
        • 10 Posts
        Ok, my first thought was to just use it in the template but, I kept reading about the menu having to be a Snippet. I think it would be better to keep it in the template.

        Thanks a bunch
        Jackie
          • 33337
          • 3,975 Posts
          You just need to use [~xx~] as link inside the template.

          For example: To link to Contact Us page in your site, you need to get its ID (displayed in document tree, e.g. 45)
          <a href="[~45~]">Contact Us</a>


          MODx parser will generate the appropriate link.

          regards,

          zi
            Zaigham R - MODX Professional | Skype | Email | Twitter

            Digging the interwebs for #MODX gems and bringing it to you. modx.link
          • I would suggest putting the menu into a chunk, then call the chunk in the template. That way, if you ever do decide to do something else with it, you only have to edit the chunk, not fiddle with the whole template.
              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
              • 4018
              • 1,131 Posts
              Actually, that menu could easily be converted into a CSS styled menu. Granted, the font for the menu items themselves would likely need to change to something like Arial, Helvetica, or the like. But you can still use a similar background for each menu item. The benefit is that you’re not stuck with specific menu items and can have a menu that is highly dynamic and can change at a moment’s notice. The downside is that you’ll be limited by the fonts that can be used for the menu text. Might be something to think heavily on. smiley
                Jeff Whitfield

                "I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
              • Or combined with sIFR, you could have the best of both worlds.
                  Ryan Thrash, MODX Co-Founder
                  Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me