How to link to Anchors?


I see its possible to create anchors.
And its realy easy to find those and create a hyperlink. BUT, the link that is created goes to ‘/#myanchor’ .
clicking on that takes me to the Homepage and not to the page i’m on. what am i doing wrong


I misunderstood my client.
We turned on Anchor links and the tab Anchors shows up fine in the ‘insert link’ modal.
But when you fill in a id for the anchor you cant save .
Apparently one MUST enter a URL. Which is undesireable.
How can we mek an Anchor with redactor and the Link to it

Hey @Rdg!

Could you clarify “Apparently one MUST enter a URL”? In the anchors tab you can just enter the anchor (name/id), and the link will be made as <a href="#anchor">title</a>.

The problem from your first post:

BUT, the link that is created goes to ‘/#myanchor’ .

Is most likely due to the presence of the <base href="[[!++site_url]]"> tag in your header. That’s a common issue when linking to anchors in MODX when following the recommendation of using the base tag, and there are several solutions for that available from the RTFM or forums. There are some plugins available (AnchorAway comes to mind), and you could also use some javascript to catch clicks to anchors to correct those.