We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27166
    • 58 Posts
    Hello,

    I’ve tried searching for the answer to this but can’t seem to pull up the forum link it suggests. I’m trying to use anchor links through fck but it’s not working, is there a way round it without the client having to code -

    <a href="[~[*id*]~]#content" title="content">Go to content</a>


    Sorry if I’m missing something obvious with this one.

    Thanks,
    Sian
      • 15297
      • 10 Posts
      Could you specify what is not working? Or is it the [*id*] FCKedit does not know? You could delete the base href element in your templates, then the FCKedit-anchor should work. But before you do so you should search for base href into the forums.
      • Deleting the base href is not recommended...it is highly recommended all your templates use this. But that does indeed mean that all anchors have to be prefixed with the actual URL, be it generated by MODx tags or hardcoded into the content.
          • 15297
          • 10 Posts
          Yes, I know. That´s why I suggested to search for base href. smiley
            • 27166
            • 58 Posts
            Sorry about not getting back sooner.

            It seems to be that all anchors link back to the home page? You add the anchor and the create a link to that anchor, hovering over this link give the following - www.website.org/#topofpage where it should really link to www.website.org/currentdir/#topofpage


            Hope that makes sense! I presume it’s something I’m doing wrong.

            Sian
            • Quote from: Sian at Jan 22, 2007, 12:29 PM

              Sorry about not getting back sooner.

              It seems to be that all anchors link back to the home page? You add the anchor and the create a link to that anchor, hovering over this link give the following - www.website.org/#topofpage where it should really link to www.website.org/currentdir/#topofpage


              Hope that makes sense! I presume it’s something I’m doing wrong.

              Sian
              One more time... If you use base href, you have to reference anchor links as [~pageid~]#anchorname or it will always refer to the base location specified in the base href...
                • 27166
                • 58 Posts
                OK, thanks I understand that.

                However is there anyway for FCKeditor or even tinyMC to do this automatically?

                Many thanks,
                Sian