[TYPO3-ttnews] default news item

Martin S martin at hauntedhousecom.net
Sat Jul 22 17:40:06 CEST 2006


Martin S wrote:

> I think I've seen this either on the lists or docs but can't find it when
> I'm looking now. I'd like to have a default news item (the latest)
> displayed when I visit a page with a tt_news object in single mode.

Finally found the section in the manual.
I am using a plain 3-column template and added a tt_news in single mode on
in the main column. 

Then I added the following an ext template on the page.

plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg =  
plugin.tt_news.singlePid=3

tmp.pagecontent < page.10.subparts.contentsarea
page.10.subparts.contentarea >
page.10.subparts.contentarea = COA
page.10.subparts.contentarea {
   10 = CONTENT
   10.table = tt_news
   10.select {
      pidInList = 4
      orderBy = datetime desc
      max = 1
      categorySelection = 4
      categoryMode = 1
   }
   10.stdWrap.if.isFalse.data = GPvar:tt_news|tt_news
   20. < tmp.pagecontent
}

Where plugin.tt_news.singlePid=3 points to my single page and
pidInList = 4 the sysfolder with news items. I am not getting anything
displayed except for the plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg =
&nbsp; (If I change &nbsp; to hi I get "hi"). I'm not getting the latest
news item for category 4 (or any at all if I remove the two "category..."
lines)


So what am I doing wrong here?





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