We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 16311
    • 28 Posts
    I’m wondering if anyone has a suggestion as to how deal with a gif based menu in MODx? By gif-based I mean each menu tab is a specific gif image that includes the label, rather than a background image with html text over the top. Because of this, the menu is hard coded in the template and so I’m looking for a way of having it show the active menu tab for whatever page I’m on. The active tab is represented by an alternative tab .gif

    Any suggestions?
      • 32982
      • 674 Posts
      you need a little snippet called giftab to ask
      if($modx->documentIdentifier==$id){$gif_output=’<img src="’.$imgactive.’" />’}else{$gif_output=’<img src="’.$imginactive.’"/>’} return $gif_output;
      and call in all tabs like [!giftab?id=`the id of the document want to show this tab`&imgactive=`www.skddf.com/myactive3.gif`&imginactive=`www.hhhr.com//myimageinactive3.gif`!]
      think is the way
      hi
        Jabiertxof (formerly XYZVISUAL)
        My bussines: http://marker.es
        https://www.youtube.com/user/jabiertxof/videos
        • 7455
        • 2,204 Posts
        I made a image menu using wayfinder and css take a look at www.kingskids.nl the menu on the top is wayfinder using png images in css.

        this is the call i used:

        [!Wayfinder? &startId=`0` &level=`1` &outerTpl=`wf_outer` &rowTpl=`wf_row` &rowIdPrefix=`hoofdmenu`&textOfLinks=`introtext`!]


        and here the templates that I used:

        wf_outer:
        <div[+wf.classes+]>
            <table cellspacing="0"><tr>
                [+wf.wrapper+]
            </tr></table>
        </div>
        



        wf_row:
        <td>
        <a href="[+wf.link+]" [+wf.id+][+wf.classes+]" title="[+wf.title+]"></a>
        </td>
        


        hope this works for you

        greets Dimmy
          follow me on twitter: @dimmy01
          • 16311
          • 28 Posts
          Thanks both, I’m using xyzvisual’s tip for this current project and I’ll be looking at Dimmy’s for future ones.