[TYPO3] tt_news uses different news_template on same single view plugin - why ?

Gunnar Jonsson gu-jonss at online.no
Sat Jun 17 11:59:21 CEST 2006


I have a page with a single view plugin in main content area and a list view 
plugin in right column. I am using a typoscript which gives the latest news 
in single view the first time I go to the page. However that latest news is 
rendered with the default news-template, but when I click on the same news 
in the list view, I get the news rendered with my own modified news 
template. Why is tt_news using different news-template depending on the way 
I get the news into the single view plugin? Either as a default (latest) 
news or by clicking on the news list. I am also using Templavoila.

I am using the following code in the rootpage template:

CONSTANTS
plugin.tt_news.file.templateFile = ungdom_news_template*.tmpl

SETUP
# hide the "no news id" message

plugin.tt_news._LOCAL_LANG.no.noNewsIdMsg =  
# set the tt_news singlePid to the current page

plugin.tt_news.singlePid = 53

tmp.pagecontent < plugin.tt_news

tmp.pagecontent {
  code >
  code = SINGLE
  pid_list >
  pid_list = 73
}

# clear the content of the main column

page.10.subparts.contentarea >

# build a new object for this column as content-object-array

page.10.subparts.contentarea = COA
page.10.subparts.contentarea {
  10 = CONTENT
  10.table = tt_news
  10.select {
    pidInList = 73
    orderBy = datetime desc
    max = 1
  }
# insert the object "10." only if there is no SINGLE news selected

  10.stdWrap.if.isFalse.data = GPvar:tx_ttnews|tt_news
# re-insert the normal pagecontent to the page

  20 < tmp.pagecontent

}

lib.newsdefault < page.10.subparts.contentarea

Regards,
Gunnar Jonsson 





More information about the TYPO3-english mailing list