[TYPO3] Relative links in template broken
Gebhardt Thomas
gebhardt at hrz.uni-marburg.de
Mon Feb 5 10:27:59 CET 2007
Hi,
On Friday 26 January 2007 12:36, Dmitry Dulepov wrote:
> Felix Natter wrote:
> > I did the following:
> > - add config.prefixLocalAnchors = 0 to main ts template
> > - remap template
> > - clear all caches
> >
> > but typo3 still prefixes local links. I am using TV 1.1.1.
> > Do I need a more recent version?
>
> No... But I was not able to reproduce behavior...
I ran into the same problem some months ago, cf.
http://lists.netfielders.de/pipermail/typo3-english/2006-March/022237.html
and fiddling around with config.prefixLocalAnchors didn't work for me
either.
As a workaround I'm using a typoscript snippet
(similiar to the code proposed by Christopher Torgalson in this thread)
<TypoScript>
10 = TEXT
10.value = Nach Oben
10.typolink.target =
10.typolink.parameter = #top
10.typolink.title = Nach Oben
</TypoScript>
or patched t3lib/class.t3lib_parsehtml.php
--- class.t3lib_parsehtml.php.orig 2006-12-31 16:30:33.000000000 +0100
+++ class.t3lib_parsehtml.php 2006-12-31 16:31:06.000000000 +0100
@@ -869,7 +869,7 @@
case 'link':
case 'a':
$src = $params[0]['href'];
- if ($src) {
+ if ($src && $src{0} != '#'){
$params[0]['href'] =
$this->prefixRelPath($prefix,$params[0]['href'],$suffix);
$somethingDone=1;
}
which worked for me. I don't know whether this patch has any unwanted
side effects!
Cheers, Thomas
More information about the TYPO3-english
mailing list