[TYPO3-english] Conditional news display by Typoscript

JoH asenau info at cybercraft.de
Thu Nov 12 13:27:54 CET 2009


> breakingnews.html : (I use it by a jQuery ticker that works by <li>
> tag)
>
>
> <!-- ###TEMPLATE_LIST### begin -->
> <div id="breakingnews">
> <ul>
> <!-- ###CONTENT### begin-->
> <!-- ###NEWS### begin -->
> <li> ###NEWS_TITLE### </li>
> <!-- ###NEWS### end-->
> <!-- ###CONTENT###  end -->
> </ul>
> </div>
> <!-- ###TEMPLATE_LIST### end -->

So the "red div" is in your Template?
You should remove it and use a TS wrap instead:

tmp.brknews = COA
tmp.brknews {
    stdWrap.wrap = <div id="breakingnews">|</div>
    stdWrap.required = 1
    10 < plugin.tt_news
    10 {
        # your code here
    }
}

The required switch will empty the COA when there is no content in 10.

IMHO the rest can stay as is

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com




More information about the TYPO3-english mailing list