[TYPO3-dev] TypoScript: stdWrap.ifEmpty but no stdWrap.ifIsset

JoH asenau info at cybercraft.de
Fri Jan 12 17:29:43 CET 2007


> I'd like a stdWrap only to be executed if there is content available.
>
> With stdWrap.ifEmpty I can define actions for the case that there is
> no data. But what do I have to do if if want these actions to happen
> only *if data is set* (e.g. a stdWrap.ifIsset).
>
> I could use the following way, but it's not very clean:
> 10 = TEXT
> 10 {
>   field = somefield
>   wrap = <div class="whatever">|</div>
>   if {
>     isTrue.field = somefield
>   }
> }

required = 1
    => renders only if there is content at all
or
fieldRequired = somefield
    => renders only if the field somefield is not empty

HTH

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your knob sometimes!)
Dieter Nuhr, German comedian
openBC/Xing: http://www.cybercraft.de
T3 cookbook: http://www.typo3experts.com






More information about the TYPO3-dev mailing list