[Typo3] [SOLVED] conditional output

Andrew Seguin asegu at borgtech.ca
Mon Nov 7 14:22:12 CET 2005


[Solution below - for those who didn't see the question first time around]
> My question relates to the conditional displaying of objects. For
> starters, I have to admit I am still quite green, I've been using typo3
...
> temp.rightside.20.if.isTrue = 0 ^ hides the object
> temp.rightside.20.if.isTrue = 1 ^ displays the object
>
> I'd hope that if.isTrue = styles.content.getBorder would have the result
> of displaying the object if there is content, not displaying when there is
>  no content. Am I referencing the object wrong? or is the object set
> under all cases? or do I need to reference a property? or...?
>
> The code:
> --------------------------------------------------------------------
> temp.rightside.20 = COA
> temp.rightside.20.if.isTrue = styles.content.getBorder
> temp.rightside.20 {
>    10 = TEXT
>    10.value = Usefull Links
>    10.wrap = <div class="title"> | </div>
>
>
>    20 = CONTENT
>    20 < styles.content.getBorder
>    20.wrap = <div id="usefull" class="newssection"> | </div>
> }
> --------------------------------------------------------------------

Solution:
(Note: I found this solution from deeper digging in mailing lists once I
noticed the numRows property -- See
http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/110135286/?tx_maillisttofaq_pi1%5Bsword%5D=numRows&tx_maillisttofaq_pi1%5Banswered_only%5D=0&tx_maillisttofaq_pi1%5Bmode%5D=1
)

All I had to change is:
  temp.rightside.20.if.isTrue < styles.content.getBorder
to:
  temp.rightside.20.if.isTrue.numRows < styles.content.getBorder

and it worked!

Thank you all!
Andrew





More information about the TYPO3-english mailing list