[TYPO3] Wraping content of a plugin

Tapio Markula tapio.markula at atwebteam.com
Thu Mar 8 09:54:36 CET 2007


JoH asenau kirjoitti:
 >>>>> Recently I had a post about how to wrap header separately from the
 >>>>> body of the content element. I learned I need to modify different
 >>>>> tt_content.xxxx.20.wrap = somw | wrap. However I cannot figure out
 >>>>> what is the xxxx for plugins? Can this be done?
 >>>> Plugins are USER or USER_INT objects, they must implement wrap
 >>>> themselves.
 >>> Well - you can wrap the content element "insert plugin" which can be
 >>> found at:
 >>>
 >>> tt_content.list
 >>>
 >>> the original TS code for this element in CSS-styled-content is:
 >>>
 >>> tt_content.list = COA
 >>> tt_content.list {
 >>>     10 =< lib.stdheader
 >>>     20 = CASE
 >>>     20 {
 >>>         # all the available plugins
 >>>         # are listed here by number
 >>>         # or name
 >>>     }
 >>> }
 >>>
 >>> Since CASE offers stdWrap properties you could do something like
 >>> this:
 >>>
 >>> tt_content.list.20.stdWrap.wrap = <bodywrap>|</bodywrap>
 >>>
 >>> But this means: Each plugin element will get the same bodywrap
 >>> regardless of the plugin that's inside.

then you could try another CASE system

below is code for headers (object '10') but that might be
easy to apply for the actual plugin (object '20').



tt_content.list = COA
tt_content.list {
                       10  = CASE
                       10 {
                              key.field = list_type

                              mininews_pi1  = < lib.stdheader
                              mininews_pi1 {
                              stdWrap.dataWrap=<div class="csc-header 
csc-header-mininews csc-header-mininews-n{cObj:parentRecordNumber}">|</div>
                              }

                             calendar_pi1  = < lib.stdheader
                             calendar_pi1 {
                             stdWrap.dataWrap=<div class="csc-header 
csc-header-calendar csc-header-calendar-n{cObj:parentRecordNumber}"><div 
class="parent">|</div></div>
                             }

                             default  = < lib.stdheader
                             default {
                             stdWrap.dataWrap=<div class="csc-header 
csc-header-list csc-header-list-n{cObj:parentRecordNumber}">|</div>
                             }
                           }

                      15 = TEXT
     15 {
           field = subheader
           required = 1
            dataWrap = <p class="csc-subheader csc-list-subheader 
csc-list-subheader-size-{field:header_layout}">|</p>
            htmlSpecialChars = 1

            editIcons = tt_content:subheader,layout
            editIcons.beforeLastTag = 1
            editIcons.iconTitle.data = 
LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.subheader

            prefixComment = 2 | Subheader:
            }
}


More information about the TYPO3-english mailing list