We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1330
    • 79 Posts
    I am working on making my site more Search friendly and in the process I am trying to use some anchoring.
    When I enable an anchor (to content at the bottom of my page and put a link at top) the link takes you to the home page /#anchorname instead of www.doamin.com/parent/child#anchorname

    Head data below:

    <base href="[(site_url)]" />
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>[(site_name)] | [*pagetitle*]</title>
    <meta name="keywords" content="[*description*]"/>
    <meta name="description" content="[*introtext*]"/>
      • 22427
      • 793 Posts
      Your code is something like this? Then it should work.
      <a href="[~[*id*]~]#anchorname">Go to anchorname</a>
      
      <a name="anchorname"> </a>
        • 43851
        • 21 Posts
        Quote from: ottogal at Dec 05, 2012, 01:42 PM
        Your code is something like this? Then it should work.
        <a href="[~[*id*]~]#anchorname">Go to anchorname</a>
        
        <a name="anchorname"> </a>

        I tried this but it returned: http://www.mydomain.com/[~[*id*]~]#top
        my anchor link is <a name="top"> </a>

        I am using SEO friendly urls. Any ideas?
          • 43851
          • 21 Posts
          Quote from: webo880 at Aug 05, 2013, 07:53 AM
          Quote from: ottogal at Dec 05, 2012, 01:42 PM
          Your code is something like this? Then it should work.
          <a href="[~[*id*]~]#anchorname">Go to anchorname</a>
          
          <a name="anchorname"> </a>

          I tried this but it returned: http://www.mydomain.com/[~[*id*]~]#top
          my anchor link is <a name="top"> </a>

          I am using SEO friendly urls. Any ideas?

          I found this and it works:
          <a href="[[~[[*id]]]]#anchorname"></a>
            • 28042 ☆ A M B ☆
            • 24,524 Posts
            That is Revolution tag syntax. You've posted in an Evolution board, which is why the difference in the tags.
              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