[TYPO3-ttnews] global wrap

Adrian Treusch v. Buttlar usenet at netzkind.org
Tue Mar 13 11:18:50 CET 2007


Hey list,

i need to wrap the first header of a given tt_news list element 
differently than all the other header - something like cscFirstHeader.

After pondering for some time i decided to give .split a chance. what i 
did now is to use title_stdWrap in displayList to wrap my header in 
something like this:

plugin.tt_news.displayList.title_stdWrap.wrap = \
<h2 class="###classToken###>|</h2>

works nicely and as expected. the troubling part is now to hook a global 
.split that is applied to the whole element. general_stdWrap does not 
qualify as it only works on bodytext, subheader and links.

so i had to copy plugin.tt_news into a coa to get my hands on a stdWrap

temp.news < plugin.tt_news
plugin.tt_news = COA
plugin.tt_news.10 < temp.news
plugin.tt_news.stdWrap.split {
     cObjNum = 1||2|*|3
     token = ###classToken###
     1.current = 1
     1.wrap = |
     2.current = 1
     2.wrap = cscFirstHeader |
     3.current = 1
     3.wrap = |
   }

this works really good but gives me the creeps ts code style wise :) any 
ideas/hints to get this done in a more smooth way? like to add a stdWrap 
property to plugin.tt_news? :)

i hope nobody already asked the question, if so: gently point me in the 
right direction.

cheers from hamburg,
adrian

(please don't use the mail address, it's spam trapped)


More information about the TYPO3-project-tt-news mailing list