Bug #8395: captionsplit does not work
authorlorenzulrich <lorenzulrich@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 27 Jan 2011 00:24:03 +0000 (00:24 +0000)
committerlorenzulrich <lorenzulrich@735d13b6-9817-0410-8766-e36946ffe9aa>
Thu, 27 Jan 2011 00:24:03 +0000 (00:24 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/dam/dam_ttcontent/trunk@42683 735d13b6-9817-0410-8766-e36946ffe9aa

ChangeLog
pi_cssstyledcontent/static/constants.txt
pi_cssstyledcontent/static/setup.txt

index 097a867..bec2b77 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-01-27  Lorenz Ulrich <lorenz.ulrich@visol.ch>
+
+       * Bug #8395: captionsplit does not work
+
 2011-01-20  Lorenz Ulrich <lorenz.ulrich@visol.ch>
 
        * Feature #13641: Use new TYPO3 4.3 hook for preview images in page module (Thanks to Dmitry Dulepov)
index a9f4d20..710364e 100755 (executable)
@@ -1,5 +1,5 @@
 
 styles.content.imgtext {
-    # cat=content/cImage/c; type=boolean; label= Images, captions: If this is checked, then each image will get a caption from DAM meta data.
+    # cat=content/cImage/c; type=boolean; label= DAM Images, captions: If this is checked, then each image will get a caption from DAM meta data. If not checked, images will get caption from Caption field if set.
   captionEach = 1
 }
index fa61333..610631e 100755 (executable)
@@ -1,5 +1,3 @@
-
-
 # *****************
 # CType: image
 # *****************
@@ -28,15 +26,24 @@ tt_content.image.20 {
                1 = TEXT
                1 {
                        field >
-                       data = field : txdam_caption // field : txdam_description // field : imagecaption
-#                      data = field : imagecaption // field : txdam_caption // field : txdam_description
+                       data = field : txdam_caption // field : txdam_description
                        required = 1
                        parseFunc =< lib.parseFunc
-                       br = 1
-                       fontTag = <p class="csc-caption">|</p>
                        wrapAlign.field = imagecaption_position
                        split >
                }
+               1.if.isTrue = {$styles.content.imgtext.captionEach}
+               
+               2 = TEXT
+               2 {
+                       field = imagecaption
+                       required = 1
+                       parseFunc =< lib.parseFunc
+                       wrapAlign.field = imagecaption_position
+                       split.token.char = 10
+                       split.token.if.isPositive = {$styles.content.imgtext.imageTextSplit} + {$styles.content.imgtext.captionSplit}
+                       split.returnKey.data = register : IMAGE_NUM_CURRENT
+               }
+               2.if.isFalse = {$styles.content.imgtext.captionEach}
        }
 }
-