We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38918
    • 5 Posts
    Any ideas on why the bookmark a href doesn't work in Modx?

    Example of this is:

    <a style="text-decoration: none;" href="#smartups 200">

    My code works if I copy my code into notepad and save as a html file then open. The bookmarks work correctly but if that same code is used in the modx framework, it doesn't function. Instead of going to the bookmark, it loads the homepage.

    Any ideas on what can be done to correct this? It's really important that my page has these bookmarks.

    Thanks!
      I love coding so much I wanna marry it
      • 3749
      • 24,544 Posts
      You should always use MODX link tags to link to a page. This should work (replace 12 with the ID of the page you want to link to):

      <a href="[[~12]]#smartups">



      Or for Evolution:


      <a href="[~12~]#smartups">





      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting