We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18913
    • 654 Posts
    At first glance, this question might appear better suited to the Navigation/Wayfinder discussion. But it’s really a question of how "legit" it is to specify an image link in the "Menu title" field of a document?

    Specifically, an entry like this
    <img src="assets/images/cal.gif" alt="Calendar" border="0" />

    put in the Menu title field of a document will show the specified graphic in the Wayfinder menu, rather than the text that would otherwise be there (or the text in the "Title" field).

    So it looks fine and seems to behave fine (other than getting a dotted outline around the graphic). What I’m wondering is if anyone knows that this isn’t really intended behavior (i.e. could be unstable) or if there’s another reason not to do it?

    To answer the question of "why" : I’ve got a client who really wants a non-standard font but I’d rather use a Wayfinder menu than hand-tailor a bunch of graphic elements. (I hope that makes sense!)

    Thanks,
    Matt
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      That should work just fine. You can get rid of the dotted outline in the CSS http://sonspring.com/journal/removing-dotted-links
        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
        • 18913
        • 654 Posts
        Thanks Susan. I ended up getting rid of the dotted line by specifying a style in the img link like

        style="border:none;"

        Shoulda thought of that before using a deprecated attribute, but the fingers were running faster than the brain smiley
        MattC
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Well, that depends on which "dotted outline" you’re talking about. By default, all images in <a> tags do have a border; of course setting this to none in the css is fine (the inline attribute for this would be style="border:none;").

          I thought you were talking about the dotted outline that most browsers put around any link on activation (mousedown). It’s usually discouraged to remove this, since it is an indicator of what link is active, but sometimes it’s just too much of a distraction from the look and feel the site is trying to project.
            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
            • 3367
            • 7 Posts
            What I’m wondering is if anyone knows that this isn’t really intended behavior (i.e. could be unstable) or if there’s another reason not to do it?

            One important thing to note (if search engine rankings and SEO are critical for you) is that the SE can’t read images as text. Yes, they can take the alt attribute, but it doesn’t have a strong SEO strength.

            So when you use images instead of actual on-page text, you are losing a lot of your keyword and target potentials for search listings.