[TYPO3-content-rendering] Revival of the group

Sacha Vorbeck vorbeck at TYPO3Tutor.de
Mon Mar 16 18:28:34 CET 2009


Hi,

> I'd love to see how you're doing it Sacha, please do post or PM me your 
> setup for this.

it`s just some nested CASE stuff - not tested. You can add an endless 
amount of other things like wraps for extension-keys etc.:

// ---------------------------------------------------
// Define wraps for content elements depending on column, content-type etc.
// ---------------------------------------------------
temp.customWrap < tt_content.stdWrap
temp.customWrap {
     innerWrap.cObject = CASE
     innerWrap.cObject {
         key.field = colPos

         1=TEXT
         1.value = <div class="ceWrap leftCol">|</div>

         default = CASE
         default {
             key.field = section_frame

             #example for custom section-frame
             30=TEXT
             30.value = <div class="ceWrap AssetBoxDefault">|</div>

             default = CASE
             default {
                 key.field = CType

                 menu = CASE
                 menu {
                     key.field = menu_type

                     #example for custom menu-type
                     101 = TEXT
                     101.value = <div class="ceWrap teaserSitemap">|</div>

                     default = TEXT
                     default.value = <div class="ceWrap defaultCol">|</div>
                 }

             }
         }
     }
}

tt_content.stdWrap >
tt_content.stdWrap < temp.customWrap

// ---------------------------------------------------
// Define basic setup for headers
// ---------------------------------------------------
lib.stdheader {
     10.setCurrent.typolink >
     stdWrap.dataWrap >
     stdWrap.prefixComment >
     10.1.fontTag = <h1>|</h2>
     10.2.fontTag = <h2>|</h2>
     10.3.fontTag = <h3>|</h3>
     10.4.fontTag = <h4>|</h4>
     10.5.fontTag = <h5>|</h5>
}

// ---------------------------------------------------
// Enable multi-line headlines
// ---------------------------------------------------
lib.stdheader {
     10.1.split {
         token = #
         cObjNum = 1||2
         1 = TEXT
         1.current = 1
         2 < .1
         2.wrap=<br />|
         3 < .2
     }
     10.2.split {
         token = #
         cObjNum = 1||2
         1 = TEXT
         1.current = 1
         2 < .1
         2.wrap=<br />|
         3 < .2
     }
     10.3.split {
         token = #
         cObjNum = 1||2
         1 = TEXT
         1.current = 1
         2 < .1
         2.wrap=<br />|
         3 < .2
     }
}

// ---------------------------------------------------
// Set different default header type for content columns
// ---------------------------------------------------
temp.header_layout_columnDependent = CASE
temp.header_layout_columnDependent {
     key.field = colPos
     2 = TEXT
     2.value = 3
     default = TEXT
     default.value = {$content.defaultHeaderType}
}

lib.stdheader {
     10.key.ifEmpty.cObject < temp.header_layout_columnDependent
}


// ---------------------------------------------------
// Set different default header type for content columns
// ---------------------------------------------------
lib.stdheader_header < lib.stdheader
lib.stdheader_header {
     10.key.ifEmpty = 1
     10.key.override = 1
}
tt_content.header.10 = < lib.stdheader_header

-- 
all the best,
Sacha


More information about the TYPO3-project-content-rendering mailing list