[TYPO3-ttnews] Hide plugin if there is no news

Patrick Gaumond gaumondpatrick-s-p-a-m at hotmail-sp-a-m.com
Fri May 8 05:25:53 CEST 2009


Gregory Loichot wrote:
>  > Sure there's a way by TS to hide the plugin and CE header
> 
> Wow, and any idea how ?

Well, maybe it's not what you're looking for but give it a try:

#Template SETUP, add a COA that got news from folder #17
page.10.43 = COA
page.10.43 {
   10 = CONTENT
   10.table = tt_news
   10.select {
     pidInList = 17
     orderBy = datetime desc
     max = 5
}

If there's no news item (quick test this by setting pidInList = 99999) 
then nothing happen... The trick being not to use "insert->plugin" from 
the interface but adding tt_news by TS.

See the SELECT section in page 32 in TSref.

Patrick


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