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

    I started with entering anchors as "#anchorname" in mij code. That worked fine.
    Due to another problem I need the base tag: ’<base href="[(site_url)]"></base>’.
    Now, all my anchors pointing to "#anchorname" are going to the homepage.

    So, I want to change all anchor references to point them to the current page.

    Question: What is the MODX Setting for ’current page’, ’this page’ or ’current url’.
    (Different way of mentioning "The page I am on right now").

    I would expect some setting as [(this_page)], but can’t find anything on that.

    Thanks for your help.

    Bert Catsburg
      • 22303 MODX Staff
      • 10,725 Posts
      See the recent plugin at http://modxcms.com/forums/index.php?topic=15753.0 or prefix the anchor with the link markup for the current page, i.e. [~[*id*]~]
        • 3177
        • 137 Posts
        Thanks for the quick reply. Now I understand, and see it in de docs.

        For the fellow-noobs later than me and seeing this topic:

        [~link~] where link is replaced by a Document Specific Variable.
        Making it [~[*id*]~]
        The list of document template variables is bookmarked smiley

        http://modxcms.com/document-tvs.html