We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22940
    • 16 Posts
    Hi everybody!

    I’m entering some content on my site using QuickEdit and have set up a FAQ page.

    I have a list of questions at the top of the page with hyperlinks to the same question repeated further down the page but with an associated answer.

    My problem is that the hyperlink to the questions does not have the current page id in the link, so it tries to load the link using just the root address.

    I’ve tried using [[page id]] and [*page id*]] nd even [!page id!] (can you guess that I’m still very new to this?) but to no avail.

    Can anyone tell me how to di this please?

    Thanks,
    Paul.
      • 10487 MODX Staff
      • 1,535 Posts
      Hi Paul,

      You can use this in your href: [~[*id*]~]#anchor

      Cheers, Garry
        Garry Nutting
        Senior Developer
        MODX, LLC

        Email: [email protected]
        Twitter: @garryn
        Web: modx.com
        • 22940
        • 16 Posts
        Hi Gary,

        Thanks mate - worked a treat - you’re a star!

        Cheers,
        Paul.
          • 8461
          • 205 Posts
          Hi Gary,

          Could you also use [~ID~]#anchor
            • 10487 MODX Staff
            • 1,535 Posts
            Hi edge,

            If you just use [~ID~], then the ID value has to be manually inserted, if you use [*id*] instead of ’ID’ then the current page ID is automatically inserted.

            It’s a timesaver more than anything else. wink

            If you were linking to an anchor on another page, then’d you have to use [~ID~]#anchor.

            Cheers, Garry
              Garry Nutting
              Senior Developer
              MODX, LLC

              Email: [email protected]
              Twitter: @garryn
              Web: modx.com
              • 8461
              • 205 Posts
              Yep, makes complete sense, forgot you were talking about same page of course !

              thanks Garry