[Typo3] backlink plus text before it

JoH info at cybercraft.de
Tue Sep 27 13:23:40 CEST 2005


>> And now let's do it the quick, short and dirty way ;-)
>>
>> temp.backlink1 =  TEXT
>> temp.backlink1 {
>>     dataWrap = Return to << {leveltitle:-2}
>>     typolink.parameter.data = leveluid:-2
>> }
>>
>> I would prefer this, because there is no ugly &nbsp; in it.
>>
>
> hi Joey
>
> this could be the best solution ever :) but something bad with this
> I have tested this code and what I am getting in source html is:
>
> Return to << test2<a href="index.php?id=3">test2</a>

Must be something with the order in which the stdWrap properties are sorted
in the PHP case.
If typolink comes before dataWrap, the result is not the desired.
So the best solution could be to put it into a COA, which is something I
recommend for almost every TS-element to get the maximum of flexibility for
possible changes or add-ons:

temp.backlink1 =  COA
temp.backlink1 {
    10 = TEXT
    10.dataWrap = Return to << {leveltitle:-2}
    stdWrap.typolink.parameter.data = leveluid:-2
}

The advantage of using dataWrap and "leveltitle:-2" here is, that you can
easily replace it with things like "levelfield : -1 , other_fieldname" to
make it work with fields like nav_title, subtitle or whatever.

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC: http://www.openbc.com/go/invuid/Jo_Hasenau





More information about the TYPO3-english mailing list