This is one that's evaded me for so long. Getting named anchors to work in my tt_news articles was a feature I've wanted on my TYPO3 websites, but it was something I had always assumed would require a lot of hacking as I thought named anchors were only available for stuff created on regular TYPO3 pages.
Well, basically, if you want to have named anchors working in your tt_news articles, you probably just need to paste the following into the setup section of your site template:### Getting named anchors to work right
### so that the anchor is appended to the entire url
### and not just the base url
config.prefixLocalAnchors = all
That's what works for me. Before I pasted that into my typoscript template, I could create anchors in the RTE content of my tt_news articles, but when the news record was called in the front end, the anchors would just be appended to the baseurl of my site like this:
When the anchor was really supposed to be appended to the actual url of my news article like this:
www.example.com/this-is-my-article-url/
Without going into a whole lot of detail, adding the typoscript I wrote above fixes the problem. Now I can copy and paste stuff I created with Openoffice & Zotero on my Ubuntu laptop and have it appear on my website with full HTML anchor support.
Add comment