[TYPO3] Templavoila: wrapping each content element within a ds

Dmitry Dulepov 9f4eetb02 at sneakemail.com
Wed Feb 21 09:39:53 CET 2007


Hi!

John Kavanagh wrote:
> I have a simple question, that I cannot find an answer for anywhere!!

Firsts, it would be good to post TV messages to TV list :)

> I want each content element that comes from a data structure mapping to
> be wrapped with a custom tag.
> 
> I have tried editing the following code that appears in the xml:
> 
> <![CDATA[
> 
>           10= RECORDS
> 
>           10.source.current=1
> 
>           10.tables = tt_content
> 
>           10.wrap = &lt;!--TYPO3SEARCH_begin--&gt; |
> &lt;!--TYPO3SEARCH_end--&gt;
> 
> ]]>
> 
> I have added 
> 
> 10.10.wrap = "<div class="item"> | </div>"
> 
> and tried to nest content objects within it, but nothing seems to work.

Sure. This "10.10" is not a valid thing. Why should it work? :)

Rendering for records in this case is defined by global content object. 
You have to write your own rendering code. I would start with adding 
something <TypoScriptObjectPath>lib.myRendering</TypoScriptObjectPath> 
to DS for that field. Then on the global level I would add:

lib.myRendering = = RECORDS
lib.myRendering {
	source.current=1
	tables = tt_content
	wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end-->
	conf.tt_content < tt_content
	conf.tt_content.dataWrap = <div class="item"> | </div>
}

and look if it works at all...

-- 
Dmitry Dulepov

Web: http://typo3bloke.net/
Skype: callto:liels_bugs

"It is our choices, that show what we truly are,
far more than our abilities." (A.P.W.B.D.)


More information about the TYPO3-english mailing list