[Typo3] 'Skip navigation' anchor not working

Robert Markula robert.markula at gmx.net
Thu Jun 9 07:03:47 CEST 2005


Robert Markula wrote:
> I use a 'skip navigation' link on top of each page, so that e.g. blind 
> visitors may jump directly to the content.
> The skip link looks like this:
> <a href="#content">Jump to the content</a>
> 
> And in the content
> <div id="content">
> ....content...
> </div>
> 
> I even tried
> <a id="content" name="content" />
> 
> It works on static pages, but in typo3 (with realURL enabled), the skip 
> link jumps to the content section all right - but always on the start 
> page. No matter on which subsite you are, clicking this link always 
> brings up the content section of the start page. Hovering over the link 
> shows up the url http://www.domain.tld/#content (instead of e.g. 
> http://www.domain.tld/subsite/#content. And I don't know why. Is this 
> possibly related with realURL?

I suppose this is a case of "RTM". In the RealURL manual [1] in the 
section 'base tag', this case is mentioned.
The problem occurs whenever the 'baseURL' is set. You can fix it by 
adding the following line to TS:

config.prefixLocalAnchors = all

This will prefix all local anchors with the url of the current page 
(e.g. <a href="http://www.domain.tld/subsite/#content">Jump to the 
content</a>).

Regards,
Ro

[1] 
http://typo3.org/documentation/document-library/realurl/Configuration-87/



More information about the TYPO3-english mailing list