[Typo3] Conditional header to plugin

Peter Klein peter at umloud.dk
Fri Mar 18 14:27:54 CET 2005


"Matias Öberg" <matias.oberg at phatbot.com> skrev i en meddelelse 
news:mailman.1211.1111144904.1576.typo3-english at lists.netfielders.de...
> The plugin returns nothing if there are no contacts.
> Only a <div></div> tag with nothing in it.
> So that shouldn't be the problem.
>

a <div></div> is not "nothing" so instead you'll have to compare with that..

Like this. (Again untested as I don't use that extension)

subparts.CONTACT_BOX = COA
subparts.CONTACT_BOX {
   10 = TEXT
   10.value = <h3>Contacts</h3>
   20 < plugin.tx_jpstaff_pi1

   if.value = <div></div>
   if.equals.cObject < plugin.tx_jpstaff_pi1
   if.negate = 1
}


"if.value = <div></div>" - This is the value we want to compare with.
"if.equals.cObject < plugin.tx_jpstaff_pi1" - The object we want to compare 
the value to.
"if.negate = 1" - Since we test if the object is empty, we need to  negate 
the result.

---
Peter Klein / Umloud





More information about the TYPO3-english mailing list