[Typo3] tt_news: starting in single view

Martin S shieldfire at gmail.com
Thu Sep 8 19:10:31 CEST 2005


i found this in the docs

Default news id 

Insert the following lines to the setup field of an ext-template at the page 
where you want to display the latest news item in SINGLE view if no SINGLE 
view for another record was requested:

 *# hide the "no news id" message*

plugin.tt_news._LOCAL_LANG.default.noNewsIdMsg *=*  

*# set the tt_news singlePid to the current page*

plugin.tt_news.singlePid *=* 977

 

*# fill the content of the main-column to a tmp.object *

tmp.pagecontent *<* page.10.subparts.contentarea

 

*# 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 *{*

*# insert the pids of all pages from where you want to fetch news. *

*# the recursive-field has no influence on this selection*

    pidInList *=* 1078,1079,1080,1081,1082,1083,1084

    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

*}

But this only talks about a specific news item id, not the latest (?).
Also it say add this to
an extension template, but can i add one on the same page as the main template?
*



2005/9/8, Martin S <shieldfire at gmail.com>:
> 
> Is it possible to "start tt_news in single view".
> What I want to do is to display the latest news item in single view on a
> page without having to go through list or latest views.
> 
> 
> Regards,
> 
> Martin S
> _______________________________________________
> Typo3-english mailing list
> Typo3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
> 



-- 
Regards,

Martin S



More information about the TYPO3-english mailing list