[TYPO3-ttnews] different category HTML classes / uids

Butch Harper begs40 at yahoo.de
Tue Feb 9 11:50:59 CET 2010


I can't believe no ones got that problem before ;))
So here is another idea, but i don't know how to code it right:

The documentation says:

plugin.tt_news.displayList {
  title_stdWrap.wrap = <div 
class="news-list-title-{register:newsCategoryUid}">|</div>
title_stdWrap.insertData=1
}

and this is working. but only for the title_stdWrap...

is it possible to do the following (pseudo code):

title_stdWrap.wrap = <div class="news-list-title"><div 
class="categoryTitle-{register:newsCategoryUid}"> ADD 
[category_stdWrap.wrap] ADD </div>|</div>

i mean, if it's possible to nest different wraps, in this case nest the 
category_stdWrap inside the title_stdWrap, it may be also possible to 
get different category css classes.

anyone?



Am 08.02.2010 12:08, schrieb Butch Harper:
> I also found some other examples, but nothing deals with the
> "category_title" attribute. Only title or e.g. subheader attributes are
> mentioned.
>
> http://ben.vantende.net/t3docs/tt_news/page/28/
> http://ben.vantende.net/nc/t3docs/tt-news/page/26/ section
> "categorySelection"
> http://www.typo3-jack.net/typo3-english-lists-netfielders-de/3423-typo3-tt_news-category-typoscript.html
>
>
>
> Isn't it possible to get the current category uid and add it to the
> category wrap????
>
>
> Am 05.02.2010 15:28, schrieb Butch Harper:
>> Hi all,
>> i googled a lot but nothing functional found...
>> i want to style my different tt_news categories easily by adding the
>> unique category id to my HTML class.
>>
>> e.g.
>> <div class="tt_news_category1">My category 1</div>
>> <div class="tt_news_category2">My category 2</div>
>> <div class="tt_news_category3">My category 3</div>
>>
>> could anyone tell me how to do that (really easy) thing? If i use the
>> "title" then it's done via:
>>
>> displayLatest{
>> title_stdWrap.wrap = {register:newsCategoryUid}
>> title_stdWrap.insertData=1
>> }
>>
>> it's not possible to change "title" with "category" because nothing
>> happens.
>> i tried a few other things like "dataWrap" or
>> "DB:tt_news:{GPvar:tx_ttnews|tt_news}:category" but i don't get the
>> point how to do that exactly.
>>
>> thank you,
>> Butch
>



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