[TYPO3-ttnews] different categories on different pages
Marcus 'biesior' Biesioroff
vsbies at wp.pl
Tue Dec 8 22:34:20 CET 2009
W dniu 2009-12-08 19:36, Aleksandar Milovac pisze:
> Hi everyone,
>
> Does anyone know an elegant solution to this problem:
>
> I have a 10 news categories which I want to display as a list on 10
> different pages (every page should display only one category). The news
> plugin would be in in lib.news which exists on every page. How can I
> configure lib.news to be display different category on each page? I know
> I can configure it in FlexForm but this is not the easiest way, TS is
> more flexible.
>
> Thanks,
> Aleksandar
Use TS conditions:
[1]http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.1/view/1/4/
and tt_news TS reference:
[2]http://typo3.org/documentation/document-library/extension-manuals/tt_news/3.0.1/view/1/4/
You can make something like this:
lib.news < plugin.tt_news
lib.news {
code >
code = LIST
// and rest of the tt_news stuff
}
//conditions, TSFE:id = x , where 'x' it's uid of the page where news
should be displayed
//using some more conditions you can display LIST and SINGLE view on the
same page
//which makes sense while using RealURL and 'fixedPostVars' with tt_news
[globaVar TSFE:id = 123]
categoryMode = 1
categorySelection = 1,2
[globaVar TSFE:id = 124]
categoryMode = 1
categorySelection = 3,4
[global]
post comment:
If you do not plan to display news from these pages on other pages (but
just on the exact location) you can also do not use categories at all,
make sure that you haven't set 'pid_list' value anywhere and then
tt_news will fetch the news from the page where list is displayed...
--
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