[Typo3] Some tt_news questions
Sandip Bhattacharya
sandip at lug-delhi.org
Sat Nov 5 13:04:29 CET 2005
I have been having some difficulty using the tt_news(the latest one in
the TER) extension for this particular website of mine. Here are some
of the problems:
1. Using multiple tt_news instances in the same root template
----------------------------------------------------------
I have to show the latest views of two different news categories in
the main template. To do this, I have configured the plugin like this
in the template setup:
===========================================================
//Global plugin setup
plugin.tt_news.templateFile=/path/to/template/file
//first news category
temp.generalnews < plugin.tt_news
temp.generalnews {
code = LATEST
singlePid = xx
archiveTypolink.parameter = xx
...
}
//second news category
temp.othernews < plugin.tt_news
temp.othernews {
code = LATEST
singlePid = yy
archiveTypolink.parameter = yy
...
}
...
temp.mainTemplate.subparts.GENERALNEWS < temp.generalnews
temp.mainTemplate.subparts.OTHERNEWS < temp.othernews
===============================================================
Now the problem I am having with this setup, is that the links for
the news items of the second category(temp.othernews) are still using
the singlePid of the first category(temp.generalnews). I am however
seeing two different LIST content, just as I want. So it is partially
working.
Am I doing something wrong here?
2. Is it possible to use the same page for viewing a LIST of news items
for different categories?
I mean that I have one page with a LIST news instance. I want this
page to either show news from general *or* other(see the last
problem) category.
Now I could seemingly make this work by adding a GET parameter to
links _coming_ to this page, and changing the pid_list on the basis
of this parameter.
But this only works for the first page. If the list spills to
different pages, the pagebrowser links doesnt have any parameter to
make the pid_list stick to the one initially set.
I am facing the same problem in using a common search page for all
the news categories.
In other words, the tt_news plugin seems to make it easy to search on
one or more categories. But I cant make a common search or list page
work on one category at a time. So if I have three category of news,
I need to have three different pages to show a single view, three
different pages to show list view, and three different pages to show
search results. :)
Can someone help me out of this misery?(Short of shooting me, that
is. :-P). I seem to be missing something obvious here from the
documentation.
3. Basic Typoscript question.
In some typoscript code snippets, I have seen code like
plugin.tt_news {
code >
code = SINGLE
}
In this, is the line ("code >") necessary? Doesnt code = SINGLE
overwrite the previous value?
Thanks,
Sandip
--
Sandip Bhattacharya * Puroga Technologies * sandip at puroga.com
Work: http://www.puroga.com * Home/Blog: http://www.sandipb.net/blog
PGP/GPG Signature: 51A4 6C57 4BC6 8C82 6A65 AE78 B1A1 2280 A129 0FF3
More information about the TYPO3-english
mailing list