[TYPO3-english] Custom wrapping text and textpic cObj

Andrew Plank plankmeister_NO at SPAM_hotmail.com
Tue Nov 24 10:09:45 CET 2009

JoH asenau wrote:
> And you really want to do this with two different elements although the id
> already contains the term pointing to the solution?
> You should NEVER use content elements for this purpose since this is a job
> for one of the different TypoScript WRAPs.
> tt_content.stdWrap.outerWrap = blah|blah
> should be doing exactly what you want.

So, if in the page I have 12 content elements; the first three and the 
last three are Text w/image, and the remainder are simple Text content 
elements. These 6 "middle" content elements have their header type set 
to my extension type, which will then process each of these 6 headers as 
all the content elements on the page are rendered.
The extension basically wraps the header in a div with a specific CSS 
class for targetting using Stickman's Protaculous Accordions. Each 
accordion "leaf" needs a header and a body, so the extension also wraps 
the bodytext property of each of the elements.
For the accordion to work, it needs to be told which HTML element on the 
page contains all the accordions, and for DOM traversal reasons, it 
should only contain the accordion header and accordion body elements as 
immediate descendants.
Threfore, it is necessary to wrap the entire bunch of accordion leaves 
with an HTML wrapper, in order for the accordions to work. This wrapper 
cannot use normal stdWrap, as it needs to be inserted into the output in 
very specific places. I fail to see how stdWrap can be so specific in 
targetting locations for output.

tt_content.stdWrap.outerWrap = blah|blah would wrap each individual 
content element, which is absolutely not what is required.

And anyway, I've achieved exactly what I wanted to, and it works perfectly.

More information about the TYPO3-english mailing list