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

John Kavanagh john.kavanagh at roomthree.com
Wed Feb 21 13:15:49 CET 2007


Thanks for that Dmitry! It worked perfectly with just a little tweak to
the last line:

conf.tt_content.stdWrap.dataWrap = <div class="item"> | </div>

(I added stdWrap)

JK

-----Original Message-----
From: typo3-english-bounces at lists.netfielders.de
[mailto:typo3-english-bounces at lists.netfielders.de] On Behalf Of Dmitry
Dulepov
Sent: 21 February 2007 08:40
To: typo3-english at lists.netfielders.de
Subject: Re: [TYPO3] Templavoila: wrapping each content element within a
ds

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.)
_______________________________________________
TYPO3-english mailing list
TYPO3-english at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english




More information about the TYPO3-english mailing list