[TYPO3-templavoila] mapping anchor tags was from the typo3 English list RE: [TYPO3] Showstopper for IE: RealURL and Named Anchors withinthe same page

Cate & Peter catepeter at optusnet.com.au
Tue Nov 20 12:57:31 CET 2007


Hi all

I am needing to map some anchor points in the template, and came across this
email below from the typo3 list, but am having some problems.

In point 2 & 3, Joerg says

2.
> In TV add a new Data Element to the TV page template you are using:
>     Mapping Type:  Attribute
>     Editing Type:  TypoScript Object Path
>     Object Path:  lib.linkTop1
>     Mapping Rules:  a:attr:href
> 3.
> In TV map the new Data Element to the anchor tag

I am trying to map the data element, but it won't "stick" to the anchor tag.

Is it a problem because I am mapping to an <a> tag? Is there something else
I am missing? Should it be mapped to the start of the content element I want
to anchor? (Although, only <a> tags are available, so I don't know what else
should work really...)

And what is the "config.prefixLocalAnchors = all" needed for?

:S mm ... confused...

Cate 


> -----Original Message-----
> From: typo3-english-bounces at lists.netfielders.de [mailto:typo3-english-
> bounces at lists.netfielders.de] On Behalf Of Joerg Wagner
> Sent: Wednesday, 22 November 2006 5:13 AM
> To: typo3-english at lists.netfielders.de
> Subject: Re: [TYPO3] Showstopper for IE: RealURL and Named Anchors
withinthe
> same page
> 
> Hello Ben,
> 
> thanks for your answer.
> I was using the "config.prefixLocalAnchors = all" directive all the time
> (found it when searching for a solution for my problem), but couldn't see
> any effect.
> Turns out now, that I was chasing ghosts all the time. Incredible!!! It
just
> works.
> Somehow in all my tests I always called the wrong files or didn't clear
the
> cache or whatever. Damn - I should have slept some hours inbetween...
> 
> THANKS A LOT FOR YOUR HELP. You made me recheck everything and so I found
my
> errors.
> 
> For all who will drop onto a similar situation, here are the details how I
> solved it (on a system using TemplaVoila):
> 
> 1.
> Add an anchor that links to your named anchor somewhere in the page and
give
> it a unique id:
> <a id="linkTop1" href="#pagetop">
> 
> 2.
> In TV add a new Data Element to the TV page template you are using:
>     Mapping Type:  Attribute
>     Editing Type:  TypoScript Object Path
>     Object Path:  lib.linkTop1
>     Mapping Rules:  a:attr:href
> 
> 3.
> In TV map the new Data Element to the anchor tag
> 
> 4.
> Add this code to your TS-Setup:
>     lib.linkTop1 = TEXT
>     lib.linkTop1{
>       typolink.parameter = #pagetop
>       typolink.returnLast = url
>     }
> 
> 
> THX again, Ben!
> --
> Jvrg Wagner
> 
> 
> 



More information about the TYPO3-project-templavoila mailing list