[TYPO3-dev] RFC: css_styled_content & localization]

JoH asenau info at cybercraft.de
Tue Nov 14 11:09:40 CET 2006


Since I have no write access to the core list, I will do it here:

> This was posted long time ago but still actual. The problem was that
> it
> is impossible to reference localized content elements (css styled
> content produces local anchors only to non-localized elements). It was
> decided not to fix this for 4.0.1 but I want to bring this again now.
>
> See below Bernhard's change and mine alternative version even below.
> They both change TS code for css styled content.
>
> I hope this will be solved finally. It is really a problem for
> localization.
>
> Bernhard Kraft wrote:
>>   innerWrap2 = | <p class="csc-linkToTop"><a
>>
>>
>>
href="#">{LLL:EXT:css_styled_content/pi1/locallang.php:label.toTop}</a></p>
>> innerWrap2.insertData = 1 innerWrap2.fieldRequired = linkToTop
>>
>> # like before:
>>   dataWrap = <a id="c{field:uid}"></a> |
>>
>> # new code:
>>   prepend = TEXT
>>   prepend.dataWrap = <a id="c{field:_LOCALIZED_UID}"></a>
>>   prepend.if.isTrue.field = _LOCALIZED_UID
>>
>> The new code will "prepend" the cObject which is defined. "prepend"
>> happens in stdWrap directly after dataWrap
>> so the localized-uid anchor will be before the original one.
>
> Or mine (after dataWrap):
>
> +    preCObject = TEXT
> +    preCObject {
> +        setContentToCurrent = 1
> +        field = _LOCALIZED_UID
> +        required = 1
> +    }

They are both not good at all, since they will add another anchor, where
only one is necessary.

This is my version:

# like before:
dataWrap = <a id="c{field:uid}"></a> |
# new code:
dataWrap = <a id="c{field:_LOCALIZED_UID//field:uid}"></a> |

If there is a _LOCALIZED_UID, this will be used, else the original uid will
be used as a fallback.

IMHO this solution offers a maximum of backwards compatibility while using
only one stdWrap call.

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.cybercraft.de
T3 cookbook: http://www.typo3experts.com






More information about the TYPO3-dev mailing list