[TYPO3-english] TYPO3 6.x Introduction package bootstrap 3: problem with anchor

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.nl
Thu Nov 6 08:39:42 CET 2014


On 06-11-14 08:18, bernd wilke wrote:
> Am 05.11.14 22:19, schrieb Philipp Gampe:
>> Hi Bert,
>>
>> Bert Hiddink [BENDOO e-work solutions] wrote:
>>
>>> it stays on the same page but I should not be necesarry to print the URL
>>> in front of every #?
>>>
>>> Any ideas?
>>
>> If you use config.absRefPrefix, TYPO3 CMS replaces every link with a
>> prefixed version. It does so with a simple string replace after the
>> generation.
>> Therefore, you need to turn absRefPrefix off and use baseURL instead.
>>
> isn't it the same with baseurl?
> how does a browser interpret '#abc' if baseurl is set to
> 'http://domain.tld/' ?
> is it not the same as 'http://domain.tld/#abc' ?
>
> the question might be if TYPO3 can fill in the page url before the
> anchor. This might be done if you use the link-wizard.
>
> otherwise you may use some javascript to fill in the full pageurl before
> any only-anchor-links
>
> bernd

Hello Philipp and Bernd,

Thanks for your replies.
Switching to baseURL did not resolve the issue, in Firefox, if I hover 
over the <a href="#"...> tag, it still shows:

http://www.mysite.nl/#
...instead of
http://www.mysite.nl/pagewithanchor/#

If I hardcode http://www.mysite.nl/pagewithanchor/#, the anchor works as 
expected so I guess I have to either look for a JS solution or build the 
full pageurl with typolink.

And @Bernd, what do you mean with "linkwizard"?

Thanks again!

Regards,
Bert


More information about the TYPO3-english mailing list