SitemapKontaktLoginImpressum© 2007-2010 by Oliver Roth

CaptionSplit f?ºr den CType Uploads in Verbindung mit der css_styled_content

Nach langem suchen, testen und fluchen habe ich eine Quick&Dirty-L??sung f?ºr den CaptionSplit der Dateilinks gefunden. Ich habe einfach die Eintr?§ge aus content(default) ins Setup und Constants kopiert.

 

ja, ja... nicht die perfekte L??sung, aber funktioniert!

 

 

 


Constants:

styles.content.uploads {
  # cat=content/cUploads; type=wrap; label= Wrap: Wrap for content element "Filelinks"
  wrap = <b> | </b>
  labelWrap =
  sizeWrap =
  tdWrap = |
  # cat=content/cUploads; type=wrap; label= Wrap, description: Wrap for the description of content element "Filelinks". If this is NOT set, the description will not shown up.
  descriptionWrap =
  jumpurl_secure =
  jumpurl_secure_mimeTypes = pdf=application/pdf, doc=application/msword
  jumpurl =
}

styles.content.tableStyle {
      # cat=content/cTable; type=color; label= Tables background color
  color =
  color1 =
  color2 =
  alignField =
}


Setup:

###################################################
styles.content.uploads = TEXT
styles.content.uploads {
  current = 1
  override.filelist.field = select_key
  trim = 1
  required = 1
  split {
    token = ,
    cObjNum = 1
    1.current = 1
    1.trim =1
    1.filelink {
      path = uploads/media/
      path.override.field  = select_key
      path.override.listNum = 0
      path.override.listNum.splitChar = |
      size = 1
      size.wrap = {$styles.content.uploads.tdWrap}
      size.innerWrap = &nbsp;&nbsp;&nbsp;
      size.innerWrap2 = {$styles.content.uploads.sizeWrap}
      size.fontTag = {$styles.content.uploads.wrap}
      size.bytes = 1
      size.if.isTrue.field = filelink_size
      labelStdWrap.fontTag = {$styles.content.uploads.labelWrap}
      file.fontTag = {$styles.content.uploads.wrap}
      file.wrap = {$styles.content.uploads.tdWrap}
      file.postCObject = TEXT
      file.postCObject {
        field = imagecaption
        required = 1
        if.directReturn = {$styles.content.uploads.descriptionWrap}
        wrap = <br />{$styles.content.uploads.descriptionWrap}
        listNum.stdWrap.data = register : SPLIT_COUNT
        listNum.splitChar = 10
      }
      stdWrap.wrap =  | <br>
      target = _blank
      jumpurl = {$styles.content.uploads.jumpurl}
      jumpurl.secure = {$styles.content.uploads.jumpurl_secure}
      jumpurl.secure.mimeTypes = {$styles.content.uploads.jumpurl_secure_mimeTypes}
      removePrependedNumbers = 1
    }
  }
  tableStyle < styles.content.tableStyle   
}
styles.content.uploads_icons < styles.content.uploads
styles.content.uploads_icons.split.1.filelink {
  icon = 1
  icon.wrap2 = | &nbsp;&nbsp;
  icon_link = 1
}
styles.content.uploads_imgicons < styles.content.uploads_icons
styles.content.uploads_imgicons.split.1.filelink {
  icon_image_ext_list.data = global: TYPO3_CONF_VARS|GFX|imagefile_ext
  icon.wrap = {$_blackBorderWrap}
}

  # tablestyle
styles.content.tableStyle {
  align.field = {$styles.content.tableStyle.alignField}
  border.field = table_border
  cellspacing.field = table_cellspacing
  cellpadding = 1
  cellpadding.override.field = table_cellpadding
   
  color.field = table_bgColor
  color.default = {$styles.content.tableStyle.color}
  color.1 = {$styles.content.tableStyle.color1}
  color.2 = {$styles.content.tableStyle.color2}
}

# CType: uploads
tt_content.uploads >
tt_content.uploads = COA
tt_content.uploads {
  10 = < lib.stdheader
  20 = CASE
  20 {
    setCurrent.field = media
    key.field = layout
    default < styles.content.uploads
    1 < styles.content.uploads_icons
    2 < styles.content.uploads_imgicons
    3 < styles.content.uploads_imgicons
    3.split.1.filelink.icon.wrap >
  }
 
  20.stdWrap.editIcons = tt_content:media, layout [table_bgColor|table_border|table_cellspacing|table_cellpadding], filelink_size, imagecaption
  20.stdWrap.editIcons.iconTitle=Edit filelist
}



tt_content.uploads.20.1.split.1.filelink.labelStdWrap.field = imagecaption
tt_content.uploads.20.1.split.1.filelink.labelStdWrap.listNum.stdWrap.data = register:SPLIT_COUNT
tt_content.uploads.20.1.split.1.filelink.labelStdWrap.listNum.splitChar = 10
###################################################