[TYPO3-ttnews] Templavolia and default latest news in single view

Gunnar Jonsson gu-jonss at online.no
Thu Jun 8 22:37:03 CEST 2006


Thank you for the tip. I got it to function with some modification of the 
Typoscript. But then I discovered a strange thing.

The first time I go to the news page I get the latest news in single view, 
but it seems that the default single view is using the news-template coming 
with the extension. When I click in the list in the right column I get the 
same news in single view, but now it is using the news-template I have 
modified. I have refered to the modified news-template in the rootpage 
Constant template, so why is not the single view with the default latest 
view using the modified news-template ??

In the rootpage template I have the following:
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-project-tt-news mailing list