[TYPO3-english] Wrap only particular content elements in a Templavoila mapping?
Andrew Plank
plankmeister_NO at SPAM_hotmail.com
Thu Apr 23 09:55:56 CEST 2009
Andrew Plank wrote:
> Dmitry Dulepov wrote:
>> Hi!
>>
>> Andrew Plank wrote:
>>> I'm in a situation where I have two mapped Templavoila content element
>>> fields, and I need to wrap each individual content element of one of
>>> these fields. In the TS in the TV DS, I've tried a few things, and have
>>> consulted the TSRef stdWrap documentation, but I can't see a way of
>>> wrapping each individual content element inside the mapped content
>>> elements field. The default code is:
>>>
>>> 10 = RECORDS
>>> 10.source.current = 1
>>> 10.tables = tt_content
>>> 10.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
>>>
>>> I checked the docs for "source" which is a stdWrap object, or a list of
>>> individual element IDs. This would suggest to me that doing something
>>> like 10.source.stdWrap.wrap = <blah>|</blah> should be the direction I'm
>>> looking at... I've tried a whole bunch of things with source, but can't
>>> get it to work.
>>
>> in the Web>Template>10.source.stdWrap.wrap will wrap the "source",
>> not the result. You need to examine tt_content
>> propertiesTypoScript_Object_Browser. If I remember correctly, it is a
>> COA. It means you can use COA's "wrap" property. Do in you *main* TS:
>>
>> tt_content.wrap = *test*|*test*
>>
>> and see if it shows up.
>>
>> If you want to limit it to this TV field only it will be a little more
>> complex. But if you can leave with global level wrap, use it like that.
>>
>
> Hi Dmitry,
>
> I need it to be specific to content elements in that particular TV
> field. I took your advice, however, and modified it to this:
>
> tt_content.stdWrap.wrap = *TEST*|*TEST*
> tt_content.stdWrap.if.equals.field = colPos
> tt_content.stdWrap.if.value = 1
>
> Which sort of works... It certainly only wraps the elements in "column"
> 1, but it then doesn't output any other content elements at all, even
> lib objects. Can you think of a method where I can modify this, so that
> the only effect is to wrap the elements where colPos = 1?
>
> Pointers and tips welcomed.
>
> Kind regards,
>
> Andrew Plank
AhA! I got it:
tt_content.stdWrap.outerWrap = *TEST*|*TEST*
tt_content.stdWrap.outerWrap.if.equals.field = colPos
tt_content.stdWrap.outerWrap.if.value = 1
More information about the TYPO3-english
mailing list