We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14554
    • 3 Posts
    Is it possible to add images to menu items?

    I want to add menu image’s to all page’s and show it in the menu? Is this possible and how can I do this. I’m new with modx and have read the tutorials but the only thing i seem to fix this is to upload them directly to a folder on my ftp and use @select to select them. But what I wanna achieve is that when a user Ad’s a page he gets the possibility to also add a menu image. And then when I use [!DropMenu!] it shows the page image’s

    preview http://www.johnsten.com/test/menu.gif

      • 16885
      • 255 Posts
      Quote from: johnsten at Nov 15, 2006, 04:47 AM

      Is it possible to add images to menu items?

      I want to add menu image’s to all page’s and show it in the menu? Is this possible and how can I do this. I’m new with modx and have read the tutorials but the only thing i seem to fix this is to upload them directly to a folder on my ftp and use @select to select them. But what I wanna achieve is that when a user Ad’s a page he gets the possibility to also add a menu image. And then when I use [!DropMenu!] it shows the page image’s

      preview http://www.johnsten.com/test/menu.gif
      The easiest way would be to output the menu as an ul with li’s in it, and call that background in the CSS properties of that li’s, and yes, to do so you’ll need it to be on your server wink
        • 14554
        • 3 Posts
        Thanks for the quick answer. I know how i can do that but the problem is that every menu item has another image so this isn’t going to work.

        I’ve created a Template Variable called [*menuImage*]. On every page i have a different menuImage. What i whanna create is that the "root" page shows the menu images of the subpages in its menu.
          • 16885
          • 255 Posts
          Quote from: Johnsten at Nov 15, 2006, 07:16 AM

          Thanks for the quick answer. I know how i can do that but the problem is that every menu item has another image so this isn’t going to work.

          I’ve created a Template Variable called [*menuImage*]. On every page i have a different menuImage. What i whanna create is that the "root" page shows the menu images of the subpages in its menu.
          In that case you’d have to use a template to handle that, Wayfinder allows you to do so, and you could make a separate image per unique id and call it like imgdir/[~id~] in your template (for the exact syntax check the documentation)
            • 14554
            • 3 Posts
            Isn’t it possible to call the template id’s that i created by doing something like this [[Wayfinder? &startId=`38` &titleOfLinks=’description’][menuImage]]

            Or isn’t possible to display a template from a subpage in your first page ?
              • 16885
              • 255 Posts
              I think you should look at the way WayFinder (and most other listing plugins) handle templates, because it seems you’re getting it wrong wink