[TYPO3-ttnews] Displaying Category before a block
Steffen Kamper
steffen at dislabs.de
Thu May 25 18:04:27 CEST 2006
Hi,
its typically - after i postet my problem, i got an idea, and the best: it
works :)
I made a COA for each block, so I got stdWrap-Function. No my Solution is
like that:
temp.newsblocks = COA
temps.newsblocks {
10 = COA
10 {
stdWrap.required = 1
stdWrap.wrap = <h2>Tisch & Kultur</h2>|
10 < plugin.tt_news
10 {
templateFile = fileadmin/templates/news_test.html
code = LATEST
limit = 4
singlePid = 30
pid_list=24
categoryMode = 1
categorySelection = 1
}
}
20 = COA
20 {
stdWrap.required = 1
stdWrap.wrap = <h2>Kochen mit Küchenchef Lutz Philipp</h2>|
10 < plugin.tt_news
10 {
templateFile = fileadmin/templates/news_test.html
code = LATEST
limit = 4
singlePid = 30
pid_list=24
categoryMode = 1
categorySelection = 2
}
}
...
for making the Blocks empty if there are no news, i made it with
plugin.tt_news.noNewsToListMsg_stdWrap.if.equals = Hallo Du
anyway, may be there is a more simple solution ?
mg
Steffen
"Steffen Kamper" <steffen at dislabs.de> schrieb im Newsbeitrag
news:mailman.1.1148568198.23422.typo3-project-tt-news at lists.netfielders.de...
> Hi,
>
> i tried to realize following with 5 Elements displaying News from a single
> Category, using COA
>
> <h2>Category1</h2>
> ...
> <h2>Category2</h2>
> ...
> etc.
>
> I used TS like this:
>
> #<h2>Tisch & Kultur</h2>
> 20 < plugin.tt_news
> 20 {
> templateFile = fileadmin/templates/news_test.html
> code = LATEST
> limit = 4
> singlePid = 30
> pid_list=24
> categoryMode = 1
> categorySelection = 1
>
> }
> #<h2>Kochen mit Küchenchef Lutz Philipp</h2>
> 40 < plugin.tt_news
> 40 {
> templateFile = fileadmin/templates/news_test.html
> code = LATEST
> limit = 4
> singlePid = 30
> pid_list=24
> categoryMode = 1
> categorySelection = 2
> }
> ...
>
> Now i look for any solution to wrap a block (in my case the 20,40 etc) - I
> looked for any stdWrap-solution to make the wrap denpendend from the
> content of each block, will say : I don't want to display the Heading when
> no news in this category.
>
> I also tried another with the template:
>
> <!-- ###TEMPLATE_LATEST### begin
> This is the template for the latest news, typically displayed on a
> frontpage
> -->
> <span>###NEWS_CATEGORY###</span>
> <ul>
> <!-- ###CONTENT### begin
> This is the part of the template substituted with the list of news:
> -->
>
> <!-- ###NEWS### begin
> Template for a single item
> -->
> <li><em>###NEWS_DATE###::</em><br />
> <!--###LINK_ITEM###-->###NEWS_TITLE###<!--###LINK_ITEM###--><br
> /><span>###NEWS_CATEGORY###</span>
> </li>
> <!-- ###NEWS### end-->
> <!-- ###CONTENT### end -->
> </ul>
> <!-- ###TEMPLATE_LATEST### end -->
>
> but ###NEWS_CATEGORY### is not replaced at this position.
>
> Does anybody know a way to solve it ?
>
> Thanks, mg
> Steffen
>
More information about the TYPO3-project-tt-news
mailing list