[Typo3] Using globalVar = TSFE: for content-elements

Bert Hiddink [BENDOO e-work solutions] hiddink at bendoo.com
Thu Jun 9 09:54:16 CEST 2005


Hello!

Thanks, Joey, for your reply! I worked out your suggestion which gave me 
this:

# wrap right content
#################
temp.contentRightRepeat = CONTENT
temp.contentRightRepeat {
     table = tt_content
     select {
       pidInList = this
       orderBy = sorting
       where = colpos=2
     }
     renderObj = CASE
     renderObj {
      key.field = tx_bendoo_extra_checkbox
      default = COA
      default {
        20 = TEXT
        20.field = header
        21 = TEXT
        21.field = bodytext
        stdWrap.wrap = {$rightWrap}
      }
      1 = COA
      1 {
        20 = TEXT
        20.field = header
        21 = TEXT
        21.field = bodytext
      }
     }
}

The above does wrap correctly for the different content-elements per 
default. It does not apply any wrap if checkbox 
'tx_bendoo_extra_checkbox' is checked for that content-element.

However, now the contents of '20.field = header' and '20.field = text' 
is rendered WITHOUT their respective wraps, that is WITHOUT '<div 
class="csc-header csc-header-n6"><h3>[HEADER HERE]</h3></div>', etc.

I am using CSS_styled_content/3.7.0.

Any idea why that is happening? Where do I go wrong?

Thanks again!

grt,
-brt


> 1. As you might have found by googling for "conditions typo3": NO conditions
> INSIDE curly brackets!
> 2. You should use a TS-Object CASE for this purpose. There you can set your
> field as a key field to decide what to do.
> 
> so it's:
> 
> renderObj = CASE
> renderObj {
>     key.field = tx_bendoo_extra_checkbox
>     default = WHATEVER
>     default {
>         blah
>     }
>     1 = WHATEVER
>     1 {
>         blah
>     }
> }
> 
> Not tested but should be working.
> 
> Joey
> 
> -- 


-- 
Bert Hiddink
hiddink at bendoo.nl
BENDOO e-work solutions
http://www.bendoo.nl
Harterinkdijk 8, 7065 AR SINDEREN
The Netherlands
Tel. 0315 244525




More information about the TYPO3-english mailing list