Advertisement
Guest User

Bilder abhängig der colPos in TYPO3 berechnen

a guest
Nov 8th, 2012
570
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # default width's of images
  2. styles.content.imgtext.maxW = 980
  3. tt_content.image.20.maxW = 980
  4.  
  5. # den Originalcode kopieren, um ihn wieder einsetzen zu können.
  6. temp.ttcontent.image < tt_content.image
  7.  
  8. # Fallunterscheidung nach Spalte, zu der das Inhaltselement gehört
  9. tt_content.image = CASE
  10. tt_content.image {
  11.     # margins between images and text
  12.     20.colSpace = 20
  13.     20.rowSpace = 20
  14.     20.textMargin = 20
  15.     # field for colPos
  16.     key.field = colPos
  17.     # default = alle nicht aufgeführten colPos
  18.     default < temp.ttcontent.image
  19.     # Maximale Bildbreite, normaler Fall in Pixeln
  20.     default.20.maxW = 980
  21.     # Maximale Bildbreite bei Text im Bild einstellen
  22.     default.20.maxWInText = 333
  23.     # Main 3col + Main 2col // Breite abhängig vom Backendlayout
  24.     0 < .default
  25.     0.20.maxW.cObject = CASE
  26.     0.20.maxW.cObject {
  27.         key.data = page:backend_layout
  28.         key.ifEmpty.data = levelfield:-2, backend_layout_next_level, slide
  29.         # 3col BE-Layout
  30.         2 = TEXT
  31.         2.value = 553
  32.         # 2col BE-Layout
  33.         3 = TEXT
  34.         3.value = 809
  35.     }
  36.     0.20.maxWInText = 333
  37.     # Right 3col
  38.     2 < .default
  39.     2.20.maxW = 212
  40.     2.20.maxWInText = 333
  41.     # Slider Startpage
  42.     3 < .default
  43.     3.20.maxW = 980
  44.     3.20.maxWInText = 333
  45. }
  46.  
  47. # Analog für Text mit Bild
  48. temp.ttcontent.textpic < tt_content.textpic.20
  49. tt_content.textpic.20 = CASE
  50. tt_content.textpic.20 {
  51.     key.field = colPos
  52.     0 < temp.tt_content.textpic
  53.     2 < temp.ttcontent.textpic
  54.     3 < temp.ttcontent.textpic
  55.     default < temp.ttcontent.textpic
  56.     # Einstellung für Bild oben/unten
  57.     default.maxW = 980
  58.     # Main 3col + Main 2col // Breite abhängig vom Backendlayout
  59.     0 < .default
  60.     0.maxW.cObject = CASE
  61.     0.maxW.cObject {
  62.         key.data = page:backend_layout
  63.         key.ifEmpty.data = levelfield:-2, backend_layout_next_level, slide
  64.         # 3col BE-Layout
  65.         2 = TEXT
  66.         2.value = 553
  67.         # 2col BE-Layout
  68.         3 = TEXT
  69.         3.value = 809
  70.     }
  71.     # Right 3col
  72.     2 < .default
  73.     2.maxW = 212
  74.     # Slider Startpage
  75.     3 < .default
  76.     3.maxW = 960
  77.  
  78.     # Einstellung für Bild im/neben Text
  79.     default.maxWInText = 460
  80.     # Main 3col + Main 2col // Breite abhängig vom Backendlayout
  81.     0.maxWInText = 264
  82.     0.maxWInText.cObject = CASE
  83.     0.maxWInText.cObject {
  84.         key.data = page:backend_layout
  85.         key.ifEmpty.data = levelfield:-2, backend_layout_next_level, slide
  86.         # 3col BE-Layout
  87.         2 = TEXT
  88.         2.value = 264
  89.         # 2col BE-Layout
  90.         3 = TEXT
  91.         3.value = 380
  92.     }
  93.     # Right 3col
  94.     2.maxWInText = 80
  95.     # Slider Startpage
  96.     3.maxWInText = 400
  97. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement