[TYPO3-ttnews] Display latest news item in single

Marcus 'biesior' Biesioroff vsbies at wp.pl
Mon Dec 21 14:05:16 CET 2009


W dniu 2009-12-18 18:31, Iztok Kham pisze:
> On 17. 12. 2009 21:41, Jšörg Winter wrote:
>>> So my question is simply: how do I tell tt_news SINGLE plugin to display
>>> the newest item if no item was selected?
>>>
>>>
>>> -- Iztok
>>
>> Hi Iztok,
>>
>> There is a example TS in he tt_news-manual
>>
>> http://typo3.org/documentation/document-library/extension-manuals/tt_news/3.0.1/view/1/4/#id2513502
>>
>>
>
> To be honest, I did come across this example, but it is not what I was
> looking for.
> I do not have LIST in one container and SINGLE in another. They are both
> in the same TV field (main content). I want to keep it this way so I
> don't have to have too many TV templates ...
>
> Ahhh, probably I will have to come up with a custom php function and use
> it to tell the default id from its output ...


the simple schema:

[ts]

lib.singleTtnews < plugin.tt_news
lib.singleTtnews.code >
lib.singleTtnews.code = SINGLE
// and so on...

//later...
lib.doubledNewsDisplay = COA
lib.doubledNewsDisplay.10 < lib.singleTtnews
lib.doubledNewsDisplay.20 < lib.latestTtnews
[/ts]

Then map the *lib.doubledNewsDisplay* in the TV DataStructure to 
field_main (or what is its name...)

Use stdWtrap and other allowed "kicks" to set the structure, btw it's 
easier and better to set two columns one-by-one via div's and CSS 
(float:left;)


-- 
Marcus 'biesior' Biesioroff
a.k.a. Marek Krawczyk (original)

Polish TYPO3 Community Proud Member
http://typo3.pl


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