[TYPO3] Wrap content element in div with dynamic id

Ralf Hettinger ng at ralfhettinger.de
Mon Oct 8 11:57:55 CEST 2007


Hi Øyvind,

the keyword you are searching for is cObj:parentRecordNumber which normally
counts the number of content elements.

Try searching for that and you surely will get enough input to accomplish your task.

Cheers
Ralf


Øyvind Frøland - UniWeb AS schrieb:
> Dear list,
> 
> I need a way to wrap content elements on a given page with divs. So far
> I have tried to accomplish this by using [PIDinRootline = xx] and
> tt_content.text.20.wrap = <div id="something">|</div>.
> 
> Moreover I need the ID to be dynamic - if the element is the first
> element in the content area, it should have an id = "one". Like this:
> 
> <div id="one">Content goes here</div>
> 
> Next content element in the content area:
> 
> <div id="two">Content goes here</div>
> 
> Do I need to count the number of content elements first before trying to
> assign the id? If so; how do I do that, and how do I assign the id?
> 
> Best regards
> 
> Øyvind Frøland


More information about the TYPO3-english mailing list