We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10746
    • 126 Posts
    Is there any way of getting MODx (now moved to 0.95, hooray!) to add a CSS class descriptor automatically to internal links ([~id~]) when they are expanded?

    I would like to distinguish internal/external links and this would seem to be a natural way to do it...

    Thx

    Gordon
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      If you’re using Wayfinder, you can use the Link Attributes field when you create your internal weblink.
        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
        • 10746
        • 126 Posts
        Quote from: sottwell at Nov 17, 2006, 06:53 AM

        If you’re using Wayfinder, you can use the Link Attributes field when you create your internal weblink.

        Sorry, I’m not quite sure what you mean there, b/c I do use Wayfinder, but just for the menus..

        What *I* mean is that I want some setting/mechanism so that EVERY link of the form [~x~] that I use in EVERY document (just in the running text) gets rendered as

        <a class="internal" href=".../index.php?id=x">blahdeblah</a>

        so that I can then use CSS to make all the internal ones a different colour, or some other indicator.

        But now I realize from your comment that the mechanism is already there - when I create the link in the editor (TinyMCE in 0.9.5) then I can select the "Advanced" tab and manually type "internal" into the "classes" field..

        So much to learn... thanks for your pointers.

        Cheers

        Gordon


          • 28042 ☆ A M B ☆
          • 24,524 Posts
          Ah, sorry, I misunderstood, and thought you were referring to internal weblinks in the menu!
            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