[SECURITY] Replace parseFunc with htmlspecialchars in element "table"
[Packages/TYPO3.CMS.git] / typo3 / sysext / css_styled_content / static / v6.2 / setup.txt
1 # ***************************************************************************
2 # Notice: "styles." (and "temp.") objects are UNSET after template parsing!
3 # Use "lib." for persisting storage of objects.
4 # ***************************************************************************
5
6 # Clear out any constants in this reserved room!
7 styles.content >
8
9 # get content
10 styles.content.get = CONTENT
11 styles.content.get {
12         table = tt_content
13         select.orderBy = sorting
14         select.where = colPos=0
15         select.languageField = sys_language_uid
16 }
17
18 # get content, left
19 styles.content.getLeft < styles.content.get
20 styles.content.getLeft.select.where = colPos=1
21
22 # get content, right
23 styles.content.getRight < styles.content.get
24 styles.content.getRight.select.where = colPos=2
25
26 # get content, margin
27 styles.content.getBorder < styles.content.get
28 styles.content.getBorder.select.where = colPos=3
29
30 # get news
31 styles.content.getNews < styles.content.get
32 styles.content.getNews.select.pidInList = {$styles.content.getNews.newsPid}
33
34 # Edit page object:
35 styles.content.editPanelPage = COA
36 styles.content.editPanelPage {
37         10 = EDITPANEL
38         10 {
39                 allow = toolbar,move,hide
40                 label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.page
41                 label.wrap = |&nbsp;<b>%s</b>
42         }
43 }
44
45
46
47
48
49
50
51
52
53
54
55 # *********************************************************************
56 # "lib." objects are preserved from unsetting after template parsing
57 # *********************************************************************
58
59 # Creates a condition for targets. Not allowed in XHTML except for xhtml frames DTD
60 lib.parseTarget {
61         override =
62         override.if {
63                 isTrue.data = TSFE:dtdAllowsFrames
64         }
65 }
66
67 # Creates persistent ParseFunc setup for non-HTML content. This is recommended to use (as a reference!)
68 lib.parseFunc {
69         makelinks = 1
70         makelinks.http.keep = {$styles.content.links.keep}
71         makelinks.http.extTarget < lib.parseTarget
72         makelinks.http.extTarget =
73         makelinks.http.extTarget.override = {$styles.content.links.extTarget}
74         makelinks.mailto.keep = path
75         tags {
76                 link = TEXT
77                 link {
78                         current = 1
79                         typolink.parameter.data = parameters : allParams
80                         typolink.extTarget < lib.parseTarget
81                         typolink.extTarget =
82                         typolink.extTarget.override = {$styles.content.links.extTarget}
83                         typolink.target < lib.parseTarget
84                         typolink.target =
85                         typolink.target.override = {$styles.content.links.target}
86                         parseFunc.constants =1
87                 }
88         }
89         allowTags = {$styles.content.links.allowTags}
90         denyTags = *
91         sword = <span class="csc-sword">|</span>
92         constants = 1
93
94         nonTypoTagStdWrap.HTMLparser = 1
95         nonTypoTagStdWrap.HTMLparser {
96                 keepNonMatchedTags = 1
97                 htmlSpecialChars = 2
98         }
99 }
100
101 # good old parsefunc in "styles.content.parseFunc" is created for backwards compatibility. Don't use it, just ignore.
102 styles.content.parseFunc < lib.parseFunc
103
104 # Creates persistent ParseFunc setup for RTE content (which is mainly HTML) based on the "ts_css" transformation.
105 lib.parseFunc_RTE < lib.parseFunc
106 lib.parseFunc_RTE {
107         //  makelinks >
108         # Processing <table> and <blockquote> blocks separately
109         externalBlocks = article, aside, blockquote, div, dd, dl, footer, header, nav, ol, section, table, ul
110         externalBlocks {
111                 # The blockquote content is passed into parseFunc again...
112                 blockquote.stripNL=1
113                 blockquote.callRecursive=1
114                 blockquote.callRecursive.tagStdWrap.HTMLparser = 1
115                 blockquote.callRecursive.tagStdWrap.HTMLparser.tags.blockquote.overrideAttribs = style="margin-bottom:0;margin-top:0;"
116
117                 table.stripNL=1
118                 table.stdWrap.HTMLparser = 1
119                 table.stdWrap.HTMLparser.tags.table.fixAttrib.class {
120                         default = contenttable
121                         always = 1
122                         list = contenttable
123                 }
124                 table.stdWrap.HTMLparser.keepNonMatchedTags = 1
125                 table.HTMLtableCells=1
126                 table.HTMLtableCells {
127                         # Recursive call to self but without wrapping non-wrapped cell content
128                         default.stdWrap {
129                                 parseFunc =< lib.parseFunc_RTE
130                                 parseFunc.nonTypoTagStdWrap.encapsLines.nonWrappedTag =
131                         }
132                         addChr10BetweenParagraphs=1
133                 }
134                 div.stripNL = 1
135                 div.callRecursive = 1
136
137                 article < .div
138                 aside < .div
139                 footer < .div
140                 header < .div
141                 nav < .div
142                 section < .div
143
144                 # List processing
145                 dl < .div
146                 dd < .div
147                 ol < .div
148                 ul < .div
149                 li.stdWrap.parseFunc < lib.parseFunc
150         }
151         nonTypoTagStdWrap.encapsLines {
152                 encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt,li
153                 remapTag.DIV = P
154                 nonWrappedTag = P
155                 innerStdWrap_all.ifBlank = &nbsp;
156                 addAttributes.P.class = bodytext
157                 addAttributes.P.class.setOnly=blank
158         }
159         nonTypoTagStdWrap.HTMLparser = 1
160         nonTypoTagStdWrap.HTMLparser {
161                 keepNonMatchedTags = 1
162                 htmlSpecialChars = 2
163         }
164 }
165
166
167 # Content header:
168 lib.stdheader = COA
169 lib.stdheader {
170
171         # Create class attribute for <Hx> tags
172         3 = LOAD_REGISTER
173         3 {
174                 headerClass {
175                         cObject = COA
176                         cObject {
177                                 # Create alignment class for <Hx> tags
178                                 10 = TEXT
179                                 10 {
180                                         field = header_position
181                                         required = 1
182                                         noTrimWrap = |csc-header-alignment-| |
183                                 }
184                                 # Create "csc-firstHeader" class for <Hx> tags
185                                 20 = TEXT
186                                 20 {
187                                         value = csc-firstHeader
188                                         if {
189                                                 value = 1
190                                                 equals.data = cObj:parentRecordNumber
191                                         }
192                                 }
193                                 stdWrap {
194                                         trim = 1
195                                         noTrimWrap = | class="|"|
196                                         required = 1
197                                 }
198                         }
199                 }
200         }
201
202         # Date format (not HTML5)
203         5 = TEXT
204         5 {
205                 field = date
206                 if {
207                         isTrue {
208                                 field = date
209                         }
210                         isFalse = 1
211                         isFalse {
212                                 if {
213                                         value = html5
214                                         equals.data = TSFE:config|config|doctype
215                                 }
216                         }
217                 }
218                 strftime = %x
219                 wrap = <p class="csc-header-date">|</p>
220                 prefixComment = 2 | Header date:
221         }
222
223         # This CASE cObject renders the header content:
224         # currentValue is set to the header data, possibly wrapped in link-tags.
225         10 = CASE
226         10.setCurrent {
227                 field = header
228                 htmlSpecialChars = 1
229                 typolink.parameter.field = header_link
230         }
231         10.key.field = header_layout
232         10.key.ifEmpty = {$content.defaultHeaderType}
233         10.key.ifEmpty.override.data = register: defaultHeaderType
234
235         10.1 = TEXT
236         10.1.current = 1
237         10.1.dataWrap = <h1{register:headerClass}>|</h1>
238
239         10.2 < .10.1
240         10.2.dataWrap = <h2{register:headerClass}>|</h2>
241
242         10.3 < .10.1
243         10.3.dataWrap = <h3{register:headerClass}>|</h3>
244
245         10.4 < .10.1
246         10.4.dataWrap = <h4{register:headerClass}>|</h4>
247
248         10.5 < .10.1
249         10.5.dataWrap = <h5{register:headerClass}>|</h5>
250
251         # HTML5 subheader
252         20 = CASE
253         20 {
254                 key {
255                         field = header_layout
256                 }
257
258                 default = TEXT
259                 default {
260                         wrap = <h2>|</h2>
261                         htmlSpecialChars = 1
262                         field = subheader
263                 }
264
265                 1 < .default
266
267                 2 < .default
268                 2.wrap = <h3>|</h3>
269
270                 3 < .default
271                 3.wrap = <h4>|</h4>
272
273                 4 < .default
274                 4.wrap = <h5>|</h5>
275
276                 5 < .default
277                 5.wrap = <h6>|</h6>
278
279                 if {
280                         isTrue {
281                                 field = subheader
282                         }
283                         value = html5
284                         equals.data = TSFE:config|config|doctype
285                         # Hide subheader for old style form element (it is used for recipient mail)
286                         isFalse = 0
287                         isFalse.override = 1
288                         isFalse.override {
289                                 if.equals.field = CType
290                                 if.value = mailform
291                         }
292                 }
293         }
294
295         # HTML5 Date
296         40 = COA
297         40 {
298
299                 stdWrap {
300                         wrap = <p class="csc-header-date">|</p>
301                         innerWrap {
302                                 cObject = COA
303                                 cObject {
304                                         10 = TEXT
305                                         10 {
306                                                 value = <time
307                                         }
308                                         20 = TEXT
309                                         20 {
310                                                 noTrimWrap = | datetime="|"|
311                                                 field = date
312                                                 strftime = %Y-%m-%d
313                                         }
314                                         30 = TEXT
315                                         30 {
316                                                 value = >|</time>
317                                         }
318                                 }
319                         }
320                         required = 1
321                 }
322                 10 = TEXT
323                 10 {
324                         field = date
325                         strftime = %B %e, %Y
326                 }
327                 if {
328                         isTrue {
329                                 field = date
330                         }
331                         value = html5
332                         equals.data = TSFE:config|config|doctype
333                 }
334         }
335
336         # Pops the used registers off the stack:
337         98 = RESTORE_REGISTER
338
339         # Post-processing:
340         stdWrap.fieldRequired = header
341         stdWrap.if {
342                 equals.field = header_layout
343                 value = 100
344                 negate = 1
345         }
346
347         stdWrap.editIcons = tt_content : header, [header_layout | header_position], [header_link|date]
348         stdWrap.editIcons.beforeLastTag = 1
349         stdWrap.editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.header
350
351         stdWrap {
352                 dataWrap = <div class="csc-header csc-header-n{cObj:parentRecordNumber}">|</div>
353                 dataWrap {
354                         override = <header class="csc-header csc-header-n{cObj:parentRecordNumber}">|</header>
355                         override {
356                                 if {
357                                         isTrue {
358                                                 field = date
359                                         }
360                                         value = html5
361                                         equals.data = TSFE:config|config|doctype
362                                 }
363                         }
364                 }
365         }
366         stdWrap.prefixComment = 2 | Header:
367 }
368
369
370
371
372
373 #**********************************
374 # tt_content is started
375 #**********************************
376 tt_content >
377 tt_content = CASE
378 tt_content.key.field = CType
379 tt_content.stdWrap {
380         innerWrap.cObject = CASE
381         innerWrap.cObject {
382                 key.field = section_frame
383
384                 default = COA
385                 default {
386                         10 = TEXT
387                         10 {
388                                 cObject = CASE
389                                 cObject {
390                                         key.field = CType
391
392                                         default = TEXT
393                                         default {
394                                                 value = <div id="c{field:uid}"
395                                         }
396
397                                         div = TEXT
398                                         div {
399                                                 value = <div
400                                         }
401
402                                         menu < .default
403                                         menu {
404                                                 override = <nav id="c{field:uid}"
405                                                 override {
406                                                         if {
407                                                                 value = html5
408                                                                 equals.data = TSFE:config|config|doctype
409                                                         }
410                                                 }
411                                         }
412                                 }
413                                 insertData = 1
414                         }
415
416                         20 = COA
417                         20 {
418                                 # Create default class for content
419                                 10 = TEXT
420                                 10 {
421                                         value = csc-default
422                                         required = 1
423                                         noTrimWrap = || |
424                                 }
425                                 # Create class for space before content
426                                 20 = USER
427                                 20 {
428                                         userFunc = TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController->renderSpace
429                                         space = before
430                                         constant = {$content.spaceBefore}
431                                         classStdWrap {
432                                                 required = 1
433                                                 noTrimWrap = |csc-space-before-| |
434                                         }
435                                 }
436                                 # Create class for space after content
437                                 30 = USER
438                                 30 {
439                                         userFunc = TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController->renderSpace
440                                         space = after
441                                         constant = {$content.spaceAfter}
442                                         classStdWrap {
443                                                 required = 1
444                                                 noTrimWrap = |csc-space-after-| |
445                                         }
446                                 }
447                                 stdWrap {
448                                         trim = 1
449                                         noTrimWrap = | class="|"|
450                                         required = 1
451                                 }
452                         }
453
454                         30 = TEXT
455                         30 {
456                                 cObject = CASE
457                                 cObject {
458                                         key.field = CType
459
460                                         default = TEXT
461                                         default {
462                                                 value = >|</div>
463                                         }
464
465                                         menu < .default
466                                         menu {
467                                                 override = >|</nav>
468                                                 override {
469                                                         if {
470                                                                 value = html5
471                                                                 equals.data = TSFE:config|config|doctype
472                                                         }
473                                                 }
474                                         }
475                                 }
476                         }
477                 }
478
479                 1 =< tt_content.stdWrap.innerWrap.cObject.default
480                 1.20.10.value = csc-frame csc-frame-invisible
481
482                 5 =< tt_content.stdWrap.innerWrap.cObject.default
483                 5.20.10.value = csc-frame csc-frame-rulerBefore
484
485                 6 =< tt_content.stdWrap.innerWrap.cObject.default
486                 6.20.10.value = csc-frame csc-frame-rulerAfter
487
488                 10 =< tt_content.stdWrap.innerWrap.cObject.default
489                 10.20.10.value = csc-frame csc-frame-indent
490
491                 11 =< tt_content.stdWrap.innerWrap.cObject.default
492                 11.20.10.value = csc-frame csc-frame-indent3366
493
494                 12 =< tt_content.stdWrap.innerWrap.cObject.default
495                 12.20.10.value = csc-frame csc-frame-indent6633
496
497                 20 =< tt_content.stdWrap.innerWrap.cObject.default
498                 20.20.10.value = csc-frame csc-frame-frame1
499
500                 21 =< tt_content.stdWrap.innerWrap.cObject.default
501                 21.20.10.value = csc-frame csc-frame-frame2
502
503                 66 = COA
504                 66 {
505                         10 = TEXT
506                         10 {
507                                 value = <a id="c{field:uid}"></a>
508                                 insertData = 1
509                         }
510                         # Create div with class for space before content
511                         20 = COA
512                         20 {
513                                 10 = USER
514                                 10 {
515                                         userFunc = TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController->renderSpace
516                                         space = before
517                                         constant = {$content.spaceBefore}
518                                         classStdWrap {
519                                                 required = 1
520                                                 wrap = csc-space-before-|
521                                         }
522                                 }
523                                 stdWrap {
524                                         wrap = <div class="|"></div>
525                                         required = 1
526                                 }
527                         }
528
529                         30 = TEXT
530                         30 {
531                                 value = |
532                         }
533
534                         # Create div with class for space after content
535                         40 < .20
536                         40 {
537                                 10 {
538                                         space = after
539                                         constant = {$content.spaceAfter}
540                                         classStdWrap {
541                                                 required = 1
542                                                 wrap = csc-space-after-|
543                                         }
544                                 }
545                         }
546                 }
547         }
548
549         innerWrap2 = | <p class="csc-linkToTop"><a href="#">{LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:label.toTop}</a></p>
550         innerWrap2.insertData = 1
551         innerWrap2.fieldRequired = linkToTop
552
553         prepend = TEXT
554         prepend.dataWrap = <a id="c{field:_LOCALIZED_UID}"></a>
555         prepend.if.isTrue.field = _LOCALIZED_UID
556
557         editPanel = 1
558         editPanel {
559                 allow = move,new,edit,hide,delete
560                 line = 5
561                 label = %s
562                 onlyCurrentPid = 1
563                 previewBorder = 4
564                 edit.displayRecord = 1
565         }
566
567         prefixComment = 1 | CONTENT ELEMENT, uid:{field:uid}/{field:CType}
568 }
569
570
571
572 # *****************
573 # CType: header
574 # *****************
575 # See Object path "lib.stdheader"
576 tt_content.header = COA
577 tt_content.header {
578         10 = < lib.stdheader
579
580         20 = TEXT
581         20 {
582                 field = subheader
583                 required = 1
584
585                 dataWrap = <p class="csc-subheader csc-subheader-{field:layout}">|</p>
586                 htmlSpecialChars = 1
587
588                 if {
589                         value = html5
590                         equals.data = TSFE:config|config|doctype
591                         negate = 1
592                 }
593
594                 editIcons = tt_content:subheader,layout
595                 editIcons.beforeLastTag = 1
596                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.subheader
597
598                 prefixComment = 2 | Subheader:
599         }
600 }
601
602
603
604 # *****************
605 # CType: text
606 # *****************
607 tt_content.text = COA
608 tt_content.text {
609         10 = < lib.stdheader
610
611         20 = TEXT
612         20 {
613                 field = bodytext
614                 required = 1
615
616                 parseFunc = < lib.parseFunc_RTE
617
618                 editIcons = tt_content:bodytext
619                 editIcons.beforeLastTag = 1
620                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.bodytext
621
622                 prefixComment = 2 | Text:
623         }
624 }
625
626
627
628 # *****************
629 # CType: image
630 # *****************
631 # (also used for rendering 'textpic' type):
632 tt_content.image = COA
633 tt_content.image.10 = < lib.stdheader
634 tt_content.image.20 = USER
635 tt_content.image.20 {
636         userFunc = TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController->render_textpic
637
638         preRenderRegisters {
639                 // To optimize performance we load all image captions into a register
640                 // because we need to know if at least one image has a caption at
641                 // multiple places to determine the render method.
642                 allImageCaptions.cObject = FILES
643                 allImageCaptions.cObject {
644                         references {
645                                 table = tt_content
646                                 fieldName = image
647                         }
648                         renderObj = TEXT
649                         renderObj.data = file:current:description
650                 }
651         }
652
653         # Image source
654         imgList.cObject = FILES
655         imgList.cObject {
656                 references < tt_content.image.20.preRenderRegisters.allImageCaptions.cObject.references
657                 renderObj = TEXT
658                 renderObj.data = file:current:uid
659                 renderObj.wrap = |,
660         }
661         imgPath = uploads/pics/
662
663         // This needs to be set because the UID list generated in the imgList
664         // setting contains UIDs of file references (not files).
665         imgListContainsReferenceUids = 1
666
667         # Single image rendering
668         imgObjNum = 1
669         1 {
670                 file.import.data = file:current:uid
671                 file.treatIdAsReference = 1
672                 file.width.field = imagewidth
673
674                 layoutKey = {$styles.content.imgtext.layoutKey}
675                 layout {
676                         default {
677                                 element = <img src="###SRC###" width="###WIDTH###" height="###HEIGHT###"###PARAMS######ALTPARAMS######BORDER######SELFCLOSINGTAGSLASH###>
678                         }
679                         srcset {
680                                 element = <img src="###SRC###" srcset="###SOURCECOLLECTION###"###PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###>
681                                 source = |*|###SRC### ###SRCSETCANDIDATE###,|*|###SRC### ###SRCSETCANDIDATE###
682                         }
683                         picture {
684                                 element = <picture>###SOURCECOLLECTION###<img src="###SRC###"###PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###></picture>
685                                 source = <source srcset="###SRC###" media="###MEDIAQUERY###"###SELFCLOSINGTAGSLASH###>
686                         }
687                         data {
688                                 element = <img src="###SRC###"###SOURCECOLLECTION######PARAMS######ALTPARAMS######SELFCLOSINGTAGSLASH###>
689                                 source = data-###DATAKEY###="###SRC###"
690                                 source.noTrimWrap = ; ;;
691                                 source.noTrimWrap.splitChar = ;
692                         }
693                 }
694                 # Default sourceCollection as an example
695                 # Please write your own sourceCollection (highly recommended)
696                 sourceCollection {
697                         small {
698                                 width = 200
699
700                                 srcsetCandidate = 600w
701                                 mediaQuery = (max-device-width: 600px)
702                                 dataKey = small
703                         }
704                         smallRetina {
705                                 if {
706                                         value = {$styles.content.imgtext.layoutKey}
707                                         equals = default
708                                         negate = 1
709                                 }
710
711                                 width = 200
712                                 pixelDensity = 2
713
714                                 srcsetCandidate = 600w 2x
715                                 mediaQuery = (max-device-width: 600px) AND (min-resolution: 192dpi)
716                                 dataKey = smallRetina
717                         }
718                 }
719
720                 imageLinkWrap = 1
721                 imageLinkWrap {
722                         bodyTag = <body style="margin:0; background:#fff;">
723                         wrap = <a href="javascript:close();"> | </a>
724                         width = {$styles.content.imgtext.linkWrap.width}
725                         height = {$styles.content.imgtext.linkWrap.height}
726                         effects = {$styles.content.imgtext.linkWrap.effects}
727
728                         JSwindow = 1
729                         JSwindow.newWindow = {$styles.content.imgtext.linkWrap.newWindow}
730                         JSwindow.if.isFalse = {$styles.content.imgtext.linkWrap.lightboxEnabled}
731
732                         directImageLink = {$styles.content.imgtext.linkWrap.lightboxEnabled}
733
734                         enable.field = image_zoom
735                         enable.ifEmpty.typolink.parameter.data = file:current:link
736                         enable.ifEmpty.typolink.returnLast = url
737
738                         typolink.parameter.data = file:current:link
739
740                         typolink.target < lib.parseTarget
741                         typolink.target =
742                         typolink.target.override = {$styles.content.links.target}
743
744                         typolink.extTarget < lib.parseTarget
745                         typolink.extTarget =
746                         typolink.extTarget.override = {$styles.content.links.extTarget}
747
748                         linkParams.ATagParams.dataWrap =  class="{$styles.content.imgtext.linkWrap.lightboxCssClass}" rel="{$styles.content.imgtext.linkWrap.lightboxRelAttribute}"
749                 }
750
751                 altText = TEXT
752                 altText {
753                         data = file:current:alternative
754                         stripHtml = 1
755                 }
756
757                 titleText < .altText
758                 titleText.data = file:current:title
759
760                 longdescURL {
761                         parameter {
762                                 field = longdescURL
763                                 split {
764                                         token {
765                                                 char = 10
766                                         }
767                                         returnKey.data = register : IMAGE_NUM_CURRENT
768                                 }
769                         }
770                 }
771
772                 emptyTitleHandling = {$styles.content.imgtext.emptyTitleHandling}
773                 titleInLink = {$styles.content.imgtext.titleInLink}
774                 titleInLinkAndImg = {$styles.content.imgtext.titleInLinkAndImg}
775         }
776
777         textPos.field = imageorient
778         maxW = {$styles.content.imgtext.maxW}
779         maxW.override.data = register:maxImageWidth
780         maxWInText = {$styles.content.imgtext.maxWInText}
781         maxWInText.override.data = register:maxImageWidthInText
782
783         equalH.field = imageheight
784
785         image_compression.field = image_compression
786         image_effects.field = image_effects
787
788         noRows.field = image_noRows
789
790         cols.field = imagecols
791         border.field = imageborder
792
793         caption {
794                 1 = COA
795                 1 {
796                         1 = TEXT
797                         1 {
798                                 data = file:current:description
799                                 required = 1
800                                 parseFunc =< lib.parseFunc
801                                 br = 1
802                         }
803                 }
804         }
805
806         captionAlign.field = imagecaption_position
807
808         // This needs to be set to TRUE because otherwise render_textpic will
809         // render a global caption which we do not have.
810         imageTextSplit = 1
811
812         borderThick = {$styles.content.imgtext.borderThick}
813         borderClass = {$styles.content.imgtext.borderClass}
814         colSpace = {$styles.content.imgtext.colSpace}
815         textMargin = {$styles.content.imgtext.textMargin}
816
817         borderSpace = {$styles.content.imgtext.borderSpace}
818         separateRows = {$styles.content.imgtext.separateRows}
819         addClasses =
820         addClassesCol =
821         addClassesCol.ifEmpty = csc-textpic-firstcol csc-textpic-lastcol
822         addClassesCol.override = csc-textpic-firstcol |*| |*| csc-textpic-lastcol
823         addClassesCol.override.if {
824                 isGreaterThan.field = imagecols
825                 value = 1
826         }
827
828         addClassesImage = csc-textpic-first |*| |*| csc-textpic-last
829
830         #
831         imageStdWrap.dataWrap = <div class="csc-textpic-imagewrap" style="width:{register:totalwidth}px;"> | </div>
832         imageStdWrapNoWidth.wrap = <div class="csc-textpic-imagewrap"> | </div>
833
834         # if noRows is set, wrap around each column:
835         imageColumnStdWrap.dataWrap = <div class="csc-textpic-imagecolumn" style="width:{register:columnwidth}px;"> | </div>
836
837         layout = CASE
838         layout {
839                 key.field = imageorient
840                 # above-center
841                 default = TEXT
842                 default {
843                         value = <div class="csc-textpic csc-textpic-center csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
844                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-center csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
845                         override {
846                                 if {
847                                         value = default
848                                         equals = {$styles.content.imgtext.layoutKey}
849                                         negate = 1
850                                 }
851                         }
852                 }
853                 # above-right
854                 1 = TEXT
855                 1 {
856                         value = <div class="csc-textpic csc-textpic-right csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
857                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-right csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
858                         override {
859                                 if {
860                                         value = default
861                                         equals = {$styles.content.imgtext.layoutKey}
862                                         negate = 1
863                                 }
864                         }
865                 }
866                 # above-left
867                 2 = TEXT
868                 2 {
869                         value = <div class="csc-textpic csc-textpic-left csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
870                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-left csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
871                         override {
872                                 if {
873                                         value = default
874                                         equals = {$styles.content.imgtext.layoutKey}
875                                         negate = 1
876                                 }
877                         }
878                 }
879                 # below-center
880                 8 = TEXT
881                 8 {
882                         value = <div class="csc-textpic csc-textpic-center csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
883                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-center csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
884                         override {
885                                 if {
886                                         value = default
887                                         equals = {$styles.content.imgtext.layoutKey}
888                                         negate = 1
889                                 }
890                         }
891                 }
892                 # below-right
893                 9 = TEXT
894                 9 {
895                         value = <div class="csc-textpic csc-textpic-right csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
896                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-right csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
897                         override {
898                                 if {
899                                         value = default
900                                         equals = {$styles.content.imgtext.layoutKey}
901                                         negate = 1
902                                 }
903                         }
904                 }
905                 # below-left
906                 10 = TEXT
907                 10 {
908                         value = <div class="csc-textpic csc-textpic-left csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
909                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-left csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
910                         override {
911                                 if {
912                                         value = default
913                                         equals = {$styles.content.imgtext.layoutKey}
914                                         negate = 1
915                                 }
916                         }
917                 }
918                 # intext-right
919                 17 = TEXT
920                 17 {
921                         value = <div class="csc-textpic csc-textpic-intext-right###CLASSES###">###IMAGES######TEXT###</div>
922                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-right###CLASSES###">###IMAGES######TEXT###</div>
923                         override {
924                                 if {
925                                         value = default
926                                         equals = {$styles.content.imgtext.layoutKey}
927                                         negate = 1
928                                 }
929                         }
930                 }
931                 # intext-left
932                 18 = TEXT
933                 18 {
934                         value = <div class="csc-textpic csc-textpic-intext-left###CLASSES###">###IMAGES######TEXT###</div>
935                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-left###CLASSES###">###IMAGES######TEXT###</div>
936                         override {
937                                 if {
938                                         value = default
939                                         equals = {$styles.content.imgtext.layoutKey}
940                                         negate = 1
941                                 }
942                         }
943                 }
944                 # intext-right-nowrap
945                 25 = TEXT
946                 25 {
947                         value = <div class="csc-textpic csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES######TEXT###</div>
948                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES######TEXT###</div>
949                         override {
950                                 if {
951                                         value = default
952                                         equals = {$styles.content.imgtext.layoutKey}
953                                         negate = 1
954                                 }
955                         }
956                 }
957                 # intext-left-nowrap
958                 26 = TEXT
959                 26 {
960                         value = <div class="csc-textpic csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES######TEXT###</div>
961                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES######TEXT###</div>
962                         override {
963                                 if {
964                                         value = default
965                                         equals = {$styles.content.imgtext.layoutKey}
966                                         negate = 1
967                                 }
968                         }
969                 }
970         }
971
972         rendering {
973                 # Single image - No caption
974                 singleNoCaption {
975                         # Choose another rendering for special edge cases
976                         fallbackRendering = COA
977                         fallbackRendering {
978                                 # Single image - Caption
979                                 10 = TEXT
980                                 10 {
981                                         if {
982                                                 isTrue.data = file:current:description
983                                                 value = 1
984                                                 equals.data = register:imageCount
985                                         }
986                                         value = singleCaption
987                                 }
988
989                                 # Multiple images and split caption
990                                 20 = TEXT
991                                 20 {
992                                         if {
993                                                 value = 1
994                                                 isGreaterThan.data = register:imageCount
995                                                 isTrue.if.isFalse.data = register:renderGlobalCaption
996                                                 isTrue.data = register:allImageCaptions
997                                         }
998                                         value = splitCaption
999                                 }
1000
1001                                 # Multiple images and no caption at all
1002                                 40 = TEXT
1003                                 40 {
1004                                         if {
1005                                                 value = 1
1006                                                 isGreaterThan.data = register:imageCount
1007                                                 isFalse.data = register:allImageCaptions
1008                                         }
1009                                         value = noCaption
1010                                 }
1011                         }
1012                         allStdWrap {
1013                                 dataWrap = <div class="csc-textpic-imagewrap"> | </div>
1014                                 dataWrap {
1015                                         override = <div class="csc-textpic-imagewrap" data-csc-images="{register:imageCount}" data-csc-cols="{field:imagecols}"> | </div>
1016                                         override {
1017                                                 if {
1018                                                         value = html5
1019                                                         equals.data = TSFE:config|config|doctype
1020                                                 }
1021                                         }
1022                                 }
1023                                 innerWrap.cObject = CASE
1024                                 innerWrap.cObject {
1025                                         key.field = imageorient
1026                                         # above-center
1027                                         0 = TEXT
1028                                         0.value = <div class="csc-textpic-center-outer"><div class="csc-textpic-center-inner"> | </div></div>
1029                                         # below-center
1030                                         8 < .0
1031                                 }
1032                         }
1033                         singleStdWrap {
1034                                 wrap = <div class="csc-textpic-image###CLASSES###"> | </div>
1035                                 wrap {
1036                                         override = <figure class="csc-textpic-image###CLASSES###"> | </figure>
1037                                         override {
1038                                                 if {
1039                                                         value = html5
1040                                                         equals.data = TSFE:config|config|doctype
1041                                                 }
1042                                         }
1043                                 }
1044                         }
1045                         rowStdWrap.wrap = |
1046                         noRowsStdWrap.wrap = |
1047                         lastRowStdWrap.wrap = |
1048                         columnStdWrap.wrap = |
1049                         imgTagStdWrap.wrap = |
1050                         editIconsStdWrap.wrap = <div> | </div>
1051                         caption.wrap = |
1052                 }
1053                 noCaption {
1054                         # Multiple images and no caption at all
1055                         fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
1056                         allStdWrap {
1057                                 dataWrap = <div class="csc-textpic-imagewrap"> | </div>
1058                                 dataWrap {
1059                                         override = <div class="csc-textpic-imagewrap" data-csc-images="{register:imageCount}" data-csc-cols="{field:imagecols}"> | </div>
1060                                         override {
1061                                                 if {
1062                                                         value = html5
1063                                                         equals.data = TSFE:config|config|doctype
1064                                                 }
1065                                         }
1066                                 }
1067                         }
1068                         singleStdWrap {
1069                                 wrap = <div class="csc-textpic-image###CLASSES###"> | </div>
1070                                 wrap {
1071                                         override = <figure class="csc-textpic-image###CLASSES###"> | </figure>
1072                                 }
1073                         }
1074                         rowStdWrap.wrap = <div class="csc-textpic-imagerow"> | </div>
1075                         noRowsStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-none"> | </div>
1076                         lastRowStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last"> | </div>
1077                         columnStdWrap.wrap = <div class="csc-textpic-imagecolumn###CLASSES###"> | </div>
1078                 }
1079                 singleCaption {
1080                         # Just one image with a caption
1081                         fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
1082                         singleStdWrap {
1083                                 wrap = <div class="csc-textpic-image###CLASSES###"><table>###CAPTION###<tbody><tr><td> | </td></tr></tbody></table></div>
1084                                 wrap {
1085                                         override = <figure class="csc-textpic-image###CLASSES###">|###CAPTION###</figure>
1086                                         override {
1087                                                 if {
1088                                                         value = html5
1089                                                         equals.data = TSFE:config|config|doctype
1090                                                 }
1091                                         }
1092                                 }
1093                         }
1094                         caption {
1095                                 required = 1
1096                                 wrap = <caption class="csc-textpic-caption###CLASSES###"> | </caption>
1097                                 wrap {
1098                                         override = <figcaption class="csc-textpic-caption###CLASSES###"> | </figcaption>
1099                                         override {
1100                                                 if {
1101                                                         value = html5
1102                                                         equals.data = TSFE:config|config|doctype
1103                                                 }
1104                                         }
1105                                 }
1106                         }
1107                 }
1108                 splitCaption {
1109                         fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
1110                         singleStdWrap {
1111                                 wrap = <div class="csc-textpic-image###CLASSES###"><table>###CAPTION###<tbody><tr><td> | </td></tr></tbody></table></div>
1112                                 wrap {
1113                                         override = <figure class="csc-textpic-image###CLASSES###">|###CAPTION###</figure>
1114                                         override {
1115                                                 if {
1116                                                         value = html5
1117                                                         equals.data = TSFE:config|config|doctype
1118                                                 }
1119                                         }
1120                                 }
1121                         }
1122                         rowStdWrap.wrap = <div class="csc-textpic-imagerow"> | </div>
1123                         noRowsStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-none"> | </div>
1124                         lastRowStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last"> | </div>
1125                         columnStdWrap.wrap = <div class="csc-textpic-imagecolumn###CLASSES###"> | </div>
1126                         caption {
1127                                 required = 1
1128                                 wrap = <caption class="csc-textpic-caption###CLASSES###"> | </caption>
1129                                 wrap {
1130                                         override = <figcaption class="csc-textpic-caption###CLASSES###"> | </figcaption>
1131                                         override {
1132                                                 if {
1133                                                         value = html5
1134                                                         equals.data = TSFE:config|config|doctype
1135                                                 }
1136                                         }
1137                                 }
1138                         }
1139                 }
1140         }
1141         renderMethod = singleNoCaption
1142
1143         editIcons = tt_content : image [imageorient|imagewidth|imageheight],[imagecols|image_noRows|imageborder],[image_zoom],[image_compression|image_effects|image_frames],[imagecaption_position]
1144         editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.images
1145
1146         caption.editIcons = tt_content : imagecaption_position
1147         caption.editIcons.beforeLastTag=1
1148         caption.editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.caption_position
1149
1150         stdWrap.prefixComment = 2 | Image block:
1151 }
1152
1153 # *****************
1154 # CType: textpic
1155 # *****************
1156 tt_content.textpic = COA
1157 tt_content.textpic {
1158         10 = COA
1159         10.if.value = 25
1160         10.if.isLessThan.field = imageorient
1161         10.10 = < lib.stdheader
1162
1163         20  = < tt_content.image.20
1164         20 {
1165                 text.10 = COA
1166                 text.10 {
1167                         if.value = 24
1168                         if.isGreaterThan.field = imageorient
1169                         10 = < lib.stdheader
1170                         10.stdWrap.dataWrap = <div class="csc-textpicHeader csc-textpicHeader-{field:imageorient}">|</div>
1171                 }
1172                 text.20 = < tt_content.text.20
1173                 text.wrap = <div class="csc-textpic-text"> | </div>
1174         }
1175 }
1176
1177
1178
1179 # *****************
1180 # CType: bullet
1181 # *****************
1182 tt_content.bullets = COA
1183 tt_content.bullets {
1184         10 = < lib.stdheader
1185
1186         20 = TEXT
1187         20 {
1188                 field = bodytext
1189                 trim = 1
1190                 split{
1191                         token.char = 10
1192                         cObjNum = |*|1|| 2|*|
1193                         1.current = 1
1194                         1.parseFunc =< lib.parseFunc
1195                         1.wrap = <li class="odd">|</li>
1196
1197                         2.current = 1
1198                         2.parseFunc =< lib.parseFunc
1199                         2.wrap = <li class="even">|</li>
1200                 }
1201                 dataWrap = <ul class="csc-bulletlist csc-bulletlist-{field:layout}">|</ul>
1202                 editIcons = tt_content: bodytext, [layout]
1203                 editIcons.beforeLastTag = 1
1204                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xlf:eIcon.bullets
1205
1206                 prefixComment = 2 | Bullet list:
1207         }
1208 }
1209
1210
1211 # *****************
1212 # CType: uploads
1213 # *****************
1214 tt_content.uploads = COA
1215 tt_content.uploads {
1216         10 = < lib.stdheader
1217
1218         20 = FILES
1219         20 {
1220                 # get from file references:
1221                 references {
1222                         table = tt_content
1223                         fieldName = media
1224                 }
1225
1226                 collections.field = file_collections
1227
1228                 # get from path (backwards compatibility, contains strings like "fileadmin/user_uploads/")
1229                 folders.field = select_key
1230
1231                 sorting.field = filelink_sorting
1232
1233                 # render the files
1234                 renderObj = COA
1235                 renderObj {
1236                         10 = IMAGE
1237                         10 {
1238                                 file.import.data = file:current:originalUid // file:current:uid
1239                                 file.width = 150
1240                                 stdWrap {
1241                                         if.value = 1
1242                                         if.isGreaterThan.field = layout
1243
1244                                         typolink {
1245                                                 parameter.data = file:current:originalUid // file:current:uid
1246                                                 parameter.wrap = file:|
1247                                                 fileTarget < lib.parseTarget
1248                                                 fileTarget =
1249                                                 fileTarget.override = {$styles.content.uploads.target}
1250                                                 fileTarget.override.override.field = target
1251                                                 removePrependedNumbers = 1
1252
1253                                                 title {
1254                                                         data = file:current:title
1255                                                         htmlSpecialChars = 1
1256                                                 }
1257
1258                                                 /*
1259                                                 jumpurl = {$styles.content.uploads.jumpurl}
1260                                                 jumpurl {
1261                                                         secure = {$styles.content.uploads.jumpurl_secure}
1262                                                         secure.mimeTypes = {$styles.content.uploads.jumpurl_secure_mimeTypes}
1263                                                 }
1264                                                 */
1265                                         }
1266                                 }
1267                         }
1268
1269                         # icon
1270                         15 = IMAGE
1271                         15 {
1272                                 file.import = typo3/sysext/frontend/Resources/Public/Icons/FileIcons/
1273                                 file.import.data = file:current:extension
1274                                 file.import.case = lower
1275                                 file.import.wrap = |.gif
1276                                 stdWrap {
1277                                         if {
1278                                                 value = 0
1279                                                 isGreaterThan.field = layout
1280
1281                                                 # only show the icon if we don't have a thumbnail:
1282                                                 isFalse.cObject = IMG_RESOURCE
1283                                                 isFalse.cObject.file < tt_content.uploads.20.renderObj.10.file
1284                                                 isFalse.cObject.stdWrap.if < tt_content.uploads.20.renderObj.10.stdWrap.if
1285                                         }
1286
1287                                         typolink < tt_content.uploads.20.renderObj.10.stdWrap.typolink
1288                                 }
1289                         }
1290
1291                         # filename
1292                         20 = TEXT
1293                         20 {
1294                                 data = file:current:title // file:current:name
1295                                 htmlSpecialChars = 1
1296                                 required = 1
1297
1298                                 replacement {
1299                                         # equivalent to former useSpacesInLinkText = 0; remove using > to disable it
1300                                         10 {
1301                                                 search = _
1302                                                 replace.char = 32
1303                                         }
1304
1305                                         # equivalent to former stripFileExtensionFromLinkText = 0; move "_20" to "20" to enable it. Disabled by default.
1306                                         _20 {
1307                                                 search = /(.*)(\..*)/
1308                                                 replace = \1
1309                                                 useRegExp = 1
1310                                         }
1311                                 }
1312
1313                                 typolink < tt_content.uploads.20.renderObj.10.stdWrap.typolink
1314
1315                                 wrap = <span class="csc-uploads-fileName">|</span>
1316                         }
1317
1318                         # description
1319                         30 = TEXT
1320                         30 {
1321                                 data = file:current:description
1322                                 htmlSpecialChars = 1
1323                                 wrap = <span class="csc-uploads-description">|</span>
1324
1325                                 required = 1
1326                         }
1327
1328                         # file size
1329                         40 = TEXT
1330                         40 {
1331                                 if.isTrue.field = filelink_size
1332                                 data = file:current:size
1333                                 wrap = <span class="csc-uploads-fileSize">|</span>
1334                                 bytes = 1
1335                                 bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
1336                         }
1337
1338                         # wrap of each listed file with odd/even class
1339                         wrap.cObject = COA
1340                         wrap.cObject {
1341                                 10 = LOAD_REGISTER
1342                                 10 {
1343                                         oddEvenClass = li-odd li-first |*| li-even || li-odd
1344                                         elementClass = csc-uploads-element csc-uploads-element-{file:current:extension}
1345                                         elementClass.insertData = 1
1346                                 }
1347
1348                                 20 = TEXT
1349                                 20 {
1350                                         value = <li class="{register:oddEvenClass} {register:elementClass}">|</li>
1351                                         insertData = 1
1352                                 }
1353                                 30 = RESTORE_REGISTER
1354                         }
1355                 }
1356
1357                 # wrap around whole content element with <ul> and editIcons
1358                 stdWrap {
1359                         editIcons = tt_content: media, layout [table_bgColor|table_border|table_cellspacing|table_cellpadding], filelink_size
1360                         editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.filelist
1361                         prefixComment = 2 | Filelist:
1362                         dataWrap = <ul class="csc-uploads csc-uploads-{field:layout}">|</ul>
1363                 }
1364         }
1365 }
1366
1367
1368
1369 # *****************
1370 # CType: table
1371 # *****************
1372 # Rendered by a PHP function specifically written to handle CE tables. See EXT:css_styled_content/Classes/Controller/CssStyledContentController.php
1373 tt_content.table = COA
1374 tt_content.table {
1375         10 = < lib.stdheader
1376
1377         20 = USER
1378         20.userFunc = TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController->render_table
1379         20.field = bodytext
1380
1381         20.color {
1382                 default =
1383                 1 = {$styles.content.table.backgroundColor.1}
1384                 2 = {$styles.content.table.backgroundColor.2}
1385                 200 =
1386                 240 = {$styles.content.table.backgroundColor.240}
1387                 241 = {$styles.content.table.backgroundColor.241}
1388                 242 = {$styles.content.table.backgroundColor.242}
1389                 243 = {$styles.content.table.backgroundColor.243}
1390                 244 = {$styles.content.table.backgroundColor.244}
1391         }
1392         20.tableParams_0 {
1393                 border =
1394                 cellpadding =
1395                 cellspacing =
1396         }
1397         20.tableParams_1 {
1398                 border =
1399                 cellpadding =
1400                 cellspacing =
1401         }
1402         20.tableParams_2 {
1403                 border =
1404                 cellpadding =
1405                 cellspacing =
1406         }
1407         20.tableParams_3 {
1408                 border =
1409                 cellpadding =
1410                 cellspacing =
1411         }
1412         20.innerStdWrap.wrap = |
1413         20.innerStdWrap.htmlSpecialChars = 1
1414
1415         20.stdWrap {
1416                 editIcons = tt_content: cols, bodytext, [layout], [table_bgColor|table_border|table_cellspacing|table_cellpadding]
1417                 editIcons.beforeLastTag = 1
1418                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.table
1419
1420                 prefixComment = 2 | Table:
1421         }
1422 }
1423
1424 # ******************
1425 # CType: multimedia
1426 # ******************
1427 tt_content.multimedia = COA
1428 tt_content.multimedia {
1429         10 = < lib.stdheader
1430
1431         20 = MULTIMEDIA
1432         20.file.field = multimedia
1433         20.file.wrap = uploads/media/
1434         20.file.listNum = 0
1435         20.params.field = bodytext
1436
1437         20.stdWrap {
1438                 editIcons = tt_content: multimedia, bodytext
1439                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1440
1441                 prefixComment = 2 | Multimedia element:
1442         }
1443 }
1444
1445 # *****************
1446 # CType: swfobject
1447 # *****************
1448 tt_content.swfobject = COA
1449 tt_content.swfobject {
1450         10 = < lib.stdheader
1451
1452         20 = SWFOBJECT
1453         20 {
1454                 file =
1455                 width =
1456                 height =
1457
1458                 flexParams.field = pi_flexform
1459
1460                 alternativeContent.field = bodytext
1461
1462                 layout = ###SWFOBJECT###
1463
1464                 video {
1465                         player = {$styles.content.media.videoPlayer}
1466
1467                         defaultWidth  = {$styles.content.media.defaultVideoWidth}
1468                         defaultHeight  = {$styles.content.media.defaultVideoHeight}
1469
1470                         default {
1471                                 params.quality = high
1472                                 params.menu = false
1473                                 params.allowScriptAccess = sameDomain
1474                                 params.allowFullScreen = true
1475                         }
1476                         mapping {
1477
1478                         }
1479                 }
1480
1481                 audio {
1482                         player = {$styles.content.media.audioPlayer}
1483
1484                         defaultWidth = {$styles.content.media.defaultAudioWidth}
1485                         defaultHeight = {$styles.content.media.defaultAudioHeight}
1486
1487                         default {
1488                                 params.quality = high
1489                                 params.allowScriptAccess = sameDomain
1490                                 params.menu = false
1491                         }
1492                         mapping {
1493                                 flashvars.file = soundFile
1494                         }
1495                 }
1496
1497         }
1498         20.stdWrap {
1499                 editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext
1500                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1501
1502                 prefixComment = 2 | SWFobject element:
1503         }
1504 }
1505
1506 # *****************
1507 # CType: qtobject
1508 # *****************
1509 tt_content.qtobject = COA
1510 tt_content.qtobject {
1511         10 = < lib.stdheader
1512
1513         20 = QTOBJECT
1514         20 {
1515                 file =
1516                 width =
1517                 height =
1518
1519                 flexParams.field = pi_flexform
1520
1521                 alternativeContent.field = bodytext
1522
1523                 layout = ###QTOBJECT###
1524
1525                 video {
1526                         player = {$styles.content.media.videoPlayer}
1527
1528                         defaultWidth  = {$styles.content.media.defaultVideoWidth}
1529                         defaultHeight  = {$styles.content.media.defaultVideoHeight}
1530
1531                         default {
1532                                 params.quality = high
1533                                 params.menu = false
1534                                 params.allowScriptAccess = sameDomain
1535                                 params.allowFullScreen = true
1536                         }
1537                         mapping {
1538
1539                         }
1540                 }
1541
1542                 audio {
1543                         player = {$styles.content.media.audioPlayer}
1544
1545                         defaultWidth = {$styles.content.media.defaultAudioWidth}
1546                         defaultHeight = {$styles.content.media.defaultAudioHeight}
1547
1548                         default {
1549                                 params.quality = high
1550                                 params.allowScriptAccess = sameDomain
1551                                 params.menu = false
1552                         }
1553                         mapping {
1554                                 flashvars.file = soundFile
1555                         }
1556                 }
1557         }
1558         20.stdWrap {
1559                 editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext
1560                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1561
1562                 prefixComment = 2 | QTobject element:
1563         }
1564 }
1565
1566 # *****************
1567 # CType: media
1568 # *****************
1569 tt_content.media = COA
1570 tt_content.media {
1571         10 = < lib.stdheader
1572
1573         20 = MEDIA
1574         20 {
1575
1576                 flexParams.field = pi_flexform
1577                 alternativeContent < tt_content.text.20
1578                 alternativeContent.field = bodytext
1579
1580                 type = video
1581                 renderType = auto
1582                 allowEmptyUrl = 0
1583                 forcePlayer = 1
1584
1585                 fileExtHandler {
1586                         default = MEDIA
1587                         avi = MEDIA
1588                         asf = MEDIA
1589                         class = MEDIA
1590                         wmv = MEDIA
1591                         mp3 = SWF
1592                         mp4 = SWF
1593                         m4v = SWF
1594                         swa = SWF
1595                         flv = SWF
1596                         swf = SWF
1597                         mov = QT
1598                         m4v = QT
1599                         m4a = QT
1600                 }
1601
1602                 mimeConf.swfobject < tt_content.swfobject.20
1603                 mimeConf.qtobject < tt_content.qtobject.20
1604                 mimeConf.flowplayer < tt_content.swfobject.20
1605                 mimeConf.flowplayer.audio.player = {$styles.content.media.flowPlayer}
1606                 mimeConf.flowplayer.video.player = {$styles.content.media.flowPlayer}
1607
1608         }
1609         20.stdWrap {
1610                 editIcons = tt_content: pi_flexform, bodytext
1611                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1612
1613                 prefixComment = 2 | Media element:
1614         }
1615 }
1616
1617 # ******************
1618 # CType: mailform
1619 # ******************
1620 tt_content.mailform = COA
1621 tt_content.mailform.10 = < lib.stdheader
1622 tt_content.mailform.20 = FORM
1623 tt_content.mailform.20 {
1624         useDefaultContentObject = 1
1625         accessibility = 1
1626         noWrapAttr=1
1627         formName = mailform
1628         dontMd5FieldNames = 1
1629         layout = <div class="csc-mailform-field">###LABEL### ###FIELD###</div>
1630         labelWrap.wrap = |
1631         commentWrap.wrap = |
1632         radioWrap.wrap = |<br />
1633         radioWrap.accessibilityWrap = <fieldset###RADIO_FIELD_ID###><legend>###RADIO_GROUP_LABEL###</legend>|</fieldset>
1634         REQ = 1
1635         REQ.labelWrap.wrap = |
1636         COMMENT.layout = <div class="csc-mailform-label">###LABEL###</div>
1637         RADIO.layout = <div class="csc-mailform-field">###LABEL### <span class="csc-mailform-radio">###FIELD###</span></div>
1638         LABEL.layout = <div class="csc-mailform-field">###LABEL### <span class="csc-mailform-label">###FIELD###</span></div>
1639         target < lib.parseTarget
1640         target =
1641         target.override = {$styles.content.mailform.target}
1642         goodMess = {$styles.content.mailform.goodMess}
1643         badMess = {$styles.content.mailform.badMess}
1644         redirect.field = pages
1645         redirect.listNum = 0
1646         recipient.field = subheader
1647         data.field = bodytext
1648         locationData = 1
1649         hiddenFields.stdWrap.wrap = <div style="display:none;">|</div>
1650
1651         params.radio = class="csc-mailform-radio"
1652         params.check = class="csc-mailform-check"
1653         params.submit = class="csc-mailform-submit"
1654
1655         stdWrap.wrap = <fieldset class="csc-mailform"> | </fieldset>
1656         stdWrap {
1657                 editIcons = tt_content: bodytext, pages, subheader
1658                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.form
1659
1660                 prefixComment = 2 | Mail form inserted:
1661         }
1662 }
1663
1664
1665 # ******************
1666 # CType: search
1667 # ******************
1668 tt_content.search = COA
1669 tt_content.search.10 = < lib.stdheader
1670 # Result:
1671 tt_content.search.20 = SEARCHRESULT
1672 tt_content.search.20 {
1673         allowedCols = pages.title-subtitle-keywords-description : tt_content.header-bodytext-imagecaption : tt_address.name-title-address-email-company-city-country : tt_links.title-note-note2-url : tt_board.subject-message-author-email : tt_calender.title-note : tt_products.title-note-itemnumber
1674         languageField.tt_content = sys_language_uid
1675         renderObj = COA
1676         renderObj {
1677
1678                 10 = TEXT
1679                 10.field = pages_title
1680                 10.htmlSpecialChars = 1
1681                 10.typolink {
1682                         parameter.field = uid
1683                         target < lib.parseTarget
1684                         target =
1685                         target.override = {$styles.content.searchresult.resultTarget}
1686                         additionalParams.data = register:SWORD_PARAMS
1687                         additionalParams.required = 1
1688                         additionalParams.wrap = &no_cache=1
1689                 }
1690                 10.htmlSpecialChars = 1
1691                 10.wrap = <h3 class="csc-searchResultHeader">|</h3>
1692
1693                 20 = COA
1694                 20 {
1695                         10 = TEXT
1696                         10.field = tt_content_bodytext
1697                         10.stripHtml = 1
1698                         10.htmlSpecialChars = 1
1699                 }
1700                 20.stdWrap.crop = 200 | ...
1701                 20.stdWrap.wrap = <p class="csc-searchResult">|</p>
1702         }
1703
1704         layout = COA
1705         layout {
1706                 wrap = <table border="0" cellspacing="0" cellpadding="2" class="csc-searchResultInfo"><tr> | </tr></table> ###RESULT###
1707
1708                 10 = TEXT
1709                 10.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.resultRange
1710                 10.wrap = <td class="csc-searchResultRange"><p>|</p></td>
1711
1712                 20 = TEXT
1713                 20.value = ###PREV###&nbsp;&nbsp;&nbsp;###NEXT###
1714                 20.wrap = <td class="csc-searchResultPrevNext"><p>|</p></td>
1715         }
1716
1717         noResultObj = COA
1718         noResultObj {
1719                 10 = TEXT
1720                 10.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.emptySearch
1721                 10.wrap = <h3 class="csc-noSearchResultMsg">|</h3>
1722         }
1723
1724         next = TEXT
1725         next.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchResultNext
1726
1727         prev = TEXT
1728         prev.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchResultPrev
1729
1730         target < lib.parseTarget
1731         target =
1732         target.override = {$styles.content.searchresult.target}
1733
1734         range = 20
1735
1736         stdWrap.prefixComment = 2 | Search result:
1737 }
1738
1739 # Form:
1740 tt_content.search.30 < tt_content.mailform.20
1741 tt_content.search.30 {
1742         goodMess = {$styles.content.searchform.goodMess}
1743         redirect >
1744         recipient >
1745         data >
1746         dataArray {
1747                 10.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchWord
1748                 10.type = sword=input
1749                 20.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchIn
1750                 20.type = scols=select
1751                 20.valueArray {
1752                         10.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.headersKeywords
1753                         10.value = pages.title-subtitle-keywords-description:tt_content.header
1754                         20.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.pageContent
1755                         20.value = tt_content.header-bodytext-imagecaption
1756                 }
1757                 30.type = stype=hidden
1758                 30.value = L0
1759                 40.type = submit=submit
1760                 40.value.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchButton
1761         }
1762         type.field = pages
1763         type.listNum = 0
1764         locationData = HTTP_POST_VARS
1765         no_cache = 1
1766
1767         stdWrap.wrap = <table border="0" cellspacing="1" cellpadding="1" class="csc-searchform">  | </table>
1768         stdWrap {
1769                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.search
1770
1771                 prefixComment = 2 | Search form inserted:
1772         }
1773 }
1774
1775
1776 # ****************
1777 # CType: menu
1778 # ****************
1779 tt_content.menu = COA
1780 tt_content.menu {
1781         10 = < lib.stdheader
1782
1783         20 = CASE
1784         20 {
1785                 key.field = menu_type
1786
1787                 # "Menu of these pages"
1788                 default = HMENU
1789                 default {
1790                         special = list
1791                         special.value.field = pages
1792                         stdWrap {
1793                                 prepend = COA
1794                                 prepend {
1795                                         stdWrap {
1796                                                 if.isTrue.field = accessibility_bypass
1797                                         }
1798                                         10 = LOAD_REGISTER
1799                                         10 {
1800                                                 accessibility_bypass_text = TEXT
1801                                                 accessibility_bypass_text {
1802                                                         field = accessibility_bypass_text
1803                                                 }
1804                                         }
1805                                         20 = CONTENT
1806                                         20 {
1807                                                 table = tt_content
1808                                                 select {
1809                                                         pidInList = this
1810                                                         orderBy = sorting
1811                                                         where {
1812                                                                 dataWrap = sorting>{field:sorting}
1813                                                         }
1814                                                         languageField = sys_language_uid
1815                                                         max = 1
1816                                                 }
1817                                                 renderObj = TEXT
1818                                                 renderObj {
1819                                                         required = 1
1820                                                         data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:menu.bypassNavigation
1821                                                         override.data = register:accessibility_bypass_text
1822                                                         trim = 1
1823                                                         htmlSpecialChars = 1
1824                                                         typolink {
1825                                                                 parameter {
1826                                                                         field = pid
1827                                                                 }
1828                                                                 section {
1829                                                                         field = uid
1830                                                                 }
1831                                                         }
1832                                                         wrap = <li class="csc-nav-bypass">|</li>
1833                                                 }
1834                                         }
1835                                         30 = RESTORE_REGISTER
1836                                 }
1837                                 outerWrap = <ul class="csc-menu csc-menu-def">|</ul>
1838                                 required = 1
1839                         }
1840                         1 = TMENU
1841                         1 {
1842                                 target < lib.parseTarget
1843                                 target =
1844                                 target.override = {$PAGE_TARGET}
1845                                 NO {
1846                                         stdWrap.htmlSpecialChars = 1
1847                                         wrapItemAndSub = <li>|</li>
1848                                         ATagTitle.field = description // title
1849                                 }
1850                         }
1851                 }
1852
1853                 # "Menu of subpages to these pages"
1854                 1 < .default
1855                 1 {
1856                         special = directory
1857                         stdWrap {
1858                                 outerWrap = <ul class="csc-menu csc-menu-1">|</ul>
1859                         }
1860                 }
1861
1862                 # "Sitemap - liststyle"
1863                 2 = HMENU
1864                 2 {
1865                         stdWrap < tt_content.menu.20.default.stdWrap
1866                         stdWrap {
1867                                 outerWrap = <div class="csc-sitemap">|</div>
1868                         }
1869                         1 = TMENU
1870                         1 {
1871                                 target < lib.parseTarget
1872                                 target =
1873                                 target.override = {$PAGE_TARGET}
1874                                 expAll = 1
1875                                 wrap = <ul>|</ul>
1876                                 NO {
1877                                         stdWrap.htmlSpecialChars = 1
1878                                         wrapItemAndSub = <li>|</li>
1879                                         ATagTitle.field = description // title
1880                                 }
1881                         }
1882                         2 < .1
1883                         3 < .1
1884                         4 < .1
1885                         5 < .1
1886                         6 < .1
1887                         7 < .1
1888                 }
1889
1890                 # "Section index (pagecontent w/Index checked - liststyle)"
1891                 3 < .default
1892                 3 {
1893                         special {
1894                                 value {
1895                                         override {
1896                                                 data = page:uid
1897                                                 if {
1898                                                         isFalse.field = pages
1899                                                 }
1900                                         }
1901                                 }
1902                         }
1903                         stdWrap {
1904                                 outerWrap = <ul class="csc-menu csc-menu-3">|</ul>
1905                         }
1906                         1 = TMENU
1907                         1 {
1908                                 sectionIndex = 1
1909                                 sectionIndex.type = header
1910                                 NO.wrapItemAndSub = <li class="csc-section">|</li>
1911                         }
1912                 }
1913
1914                 # "Menu of subpages to these pages (with abstract)"
1915                 4 < .1
1916                 4 {
1917                         stdWrap {
1918                                 prepend.20.renderObj.wrap = <dt class="csc-nav-bypass">|</dt><dd>&nbsp;</dd>
1919                                 outerWrap = <dl class="csc-menu csc-menu-4">|</dl>
1920                         }
1921                         1.NO {
1922                                 wrapItemAndSub >
1923                                 linkWrap = <dt>|</dt>
1924                                 after {
1925                                         cObject = TEXT
1926                                         cObject {
1927                                                 data = field : abstract // field : description // field : subtitle
1928                                                 htmlSpecialChars = 1
1929                                                 required = 1
1930                                         }
1931                                         ifBlank = &nbsp;
1932                                         wrap = <dd>|</dd>
1933                                 }
1934                                 ATagTitle.field = description // title
1935                         }
1936                 }
1937
1938                 # "Recently updated pages"
1939                 5 < .default
1940                 5 {
1941                         stdWrap {
1942                                 outerWrap = <ul class="csc-menu csc-menu-5">|</ul>
1943                         }
1944                         special = updated
1945                         special {
1946                                 maxAge = 3600*24*7
1947                                 excludeNoSearchPages = 1
1948                         }
1949                 }
1950
1951                 # "Related pages (based on keywords)"
1952                 6 < .default
1953                 6 {
1954                         stdWrap {
1955                                 outerWrap = <ul class="csc-menu csc-menu-6">|</ul>
1956                         }
1957                         special = keywords
1958                         special {
1959                                 excludeNoSearchPages = 1
1960                         }
1961                 }
1962
1963                 # "Menu of subpages to these pages + sections - liststyle"
1964                 7 < .1
1965                 7 {
1966                         stdWrap {
1967                                 outerWrap = <ul class="csc-menu csc-menu-7">|</ul>
1968                         }
1969                         1.expAll = 1
1970                         2 < .1
1971                         2 {
1972                                 sectionIndex = 1
1973                                 sectionIndex.type = header
1974                                 wrap = <ul>|</ul>
1975                                 NO.wrapItemAndSub = <li class="csc-section">|</li>
1976                         }
1977                 }
1978
1979                 # "Sitemaps of selected pages - liststyle"
1980                 8 < .2
1981                 8 {
1982                         special = directory
1983                         special.value.field = pages
1984                 }
1985
1986                 # Menu of categorized pages
1987                 categorized_pages < .default
1988                 categorized_pages {
1989                         special = categories
1990                         special.value.field = selected_categories
1991                         special.relation.field = category_field
1992                         special.sorting = title
1993                         special.order = asc
1994                         stdWrap {
1995                                 outerWrap = <ul class="csc-menu csc-menu-categorized-pages">|</ul>
1996                         }
1997                 }
1998
1999                 # Menu of categorized content elements
2000                 categorized_content = RECORDS
2001                 categorized_content {
2002                         categories.field = selected_categories
2003                         categories.relation.field = category_field
2004                         tables = tt_content
2005                         conf.tt_content = TEXT
2006                         conf.tt_content {
2007                                 field = header
2008                                 typolink.parameter = {field:pid}#{field:uid}
2009                                 typolink.parameter.insertData = 1
2010                                 wrap = <li>|</li>
2011                         }
2012                         wrap = <ul>|</ul>
2013                 }
2014         }
2015
2016         20.stdWrap {
2017                 wrap {
2018                         cObject = COA
2019                         cObject {
2020                                 10 = TEXT
2021                                 10 {
2022                                         field = accessibility_title
2023                                         htmlSpecialChars = 1
2024                                         dataWrap = <map id="map{field:uid}" title="|">
2025                                         dataWrap {
2026                                                 override = <map name="map{field:uid}" title="|">
2027                                                 override {
2028                                                         if {
2029                                                                 isFalse.data = TSFE:xhtmlDoctype
2030                                                         }
2031                                                 }
2032                                         }
2033                                 }
2034
2035                                 20 = TEXT
2036                                 20 {
2037                                         value = |</map>
2038                                 }
2039                         }
2040                         if {
2041                                 isTrue {
2042                                         field = accessibility_title
2043                                 }
2044                         }
2045                 }
2046                 editIcons = tt_content: menu_type, pages
2047                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.menuSitemap
2048
2049                 prefixComment = 2 | Menu/Sitemap element:
2050         }
2051 }
2052
2053
2054
2055 # ****************
2056 # CType: shortcut
2057 # ****************
2058 # Should be a complete copy from the old static template "content (default)"
2059 tt_content.shortcut = COA
2060 tt_content.shortcut {
2061
2062         20 = RECORDS
2063         20 {
2064                 source.field = records
2065                 tables = {$content.shortcut.tables}
2066         }
2067
2068         20.stdWrap {
2069                 editIcons = tt_content: records
2070                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.recordList
2071
2072                 prefixComment = 2 | Inclusion of other records (by reference):
2073         }
2074 }
2075
2076
2077 # ****************
2078 # CType: list
2079 # ****************
2080 # Should be a complete copy from the old static template "content (default)" (except "lib.stdheader")
2081 tt_content.list = COA
2082 tt_content.list {
2083         10 = < lib.stdheader
2084
2085         20 = CASE
2086         20.key.field = list_type
2087
2088         20.stdWrap {
2089                 editIcons = tt_content: list_type, layout, select_key, pages [recursive]
2090                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.plugin
2091
2092                 prefixComment = 2 | Plugin inserted:
2093         }
2094 }
2095
2096
2097 # ****************
2098 # CType: div
2099 # ****************
2100 tt_content.div = TEXT
2101 tt_content.div {
2102         value = <hr>
2103         override = <hr />
2104         override.if {
2105                 isTrue.data = TSFE:xhtmlDoctype
2106         }
2107         wrap = <div class="divider">|</div>
2108         prefixComment = 2 | Div element
2109 }
2110
2111
2112 # ****************
2113 # CType: html
2114 # ****************
2115 # This truely IS a content object, launched from inside the PHP class of course.
2116 # Should be a complete copy from the old static template "content (default)"
2117 tt_content.html = TEXT
2118 tt_content.html {
2119         field = bodytext
2120
2121         editIcons = tt_content:bodytext
2122         editIcons.beforeLastTag = 1
2123         editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.html
2124
2125         prefixComment = 2 | Raw HTML content:
2126 }
2127
2128
2129 # ****************
2130 # Default error msg:
2131 # ****************
2132 tt_content.default = TEXT
2133 tt_content.default {
2134         field = CType
2135         wrap = <p style="background-color: yellow;"><b>ERROR:</b> Content Element type "|" has no rendering definition!</p>
2136
2137         prefixComment = 2 | Unknown element message:
2138 }
2139
2140 # *********************************************************************
2141 # ACCESSIBILTY MODE
2142 # *********************************************************************
2143
2144
2145
2146
2147
2148
2149
2150 plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE (
2151         /* Headers */
2152         .csc-header-alignment-center { text-align: center; }
2153         .csc-header-alignment-right { text-align: right; }
2154         .csc-header-alignment-left { text-align: left; }
2155
2156         div.csc-textpic-responsive, div.csc-textpic-responsive * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;  }
2157
2158         /* Clear floats after csc-textpic and after csc-textpic-imagerow */
2159         div.csc-textpic, div.csc-textpic div.csc-textpic-imagerow, ul.csc-uploads li { overflow: hidden; }
2160
2161         /* Set padding for tables */
2162         div.csc-textpic .csc-textpic-imagewrap table { border-collapse: collapse; border-spacing: 0; }
2163         div.csc-textpic .csc-textpic-imagewrap table tr td { padding: 0; vertical-align: top; }
2164
2165         /* Settings for figure and figcaption (HTML5) */
2166         div.csc-textpic .csc-textpic-imagewrap figure, div.csc-textpic figure.csc-textpic-imagewrap { margin: 0; display: table; }
2167
2168         /* Captions */
2169         figcaption.csc-textpic-caption { display: table-caption; }
2170         .csc-textpic-caption { text-align: left; caption-side: bottom; }
2171         div.csc-textpic-caption-c .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-c { text-align: center; }
2172         div.csc-textpic-caption-r .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-r { text-align: right; }
2173         div.csc-textpic-caption-l .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-l { text-align: left; }
2174
2175         /* Float the columns */
2176         div.csc-textpic div.csc-textpic-imagecolumn { float: left; }
2177
2178         /* Border just around the image */
2179         {$styles.content.imgtext.borderSelector} {
2180                 border: {$styles.content.imgtext.borderThick}px solid {$styles.content.imgtext.borderColor};
2181                 padding: {$styles.content.imgtext.borderSpace}px {$styles.content.imgtext.borderSpace}px;
2182         }
2183
2184         div.csc-textpic .csc-textpic-imagewrap img { border: none; display: block; }
2185
2186         /* Space below each image (also in-between rows) */
2187         div.csc-textpic .csc-textpic-imagewrap .csc-textpic-image { margin-bottom: {$styles.content.imgtext.rowSpace}px; }
2188         div.csc-textpic .csc-textpic-imagewrap .csc-textpic-imagerow-last .csc-textpic-image { margin-bottom: 0; }
2189
2190         /* colSpace around image columns, except for last column */
2191         div.csc-textpic-imagecolumn, td.csc-textpic-imagecolumn .csc-textpic-image { margin-right: {$styles.content.imgtext.colSpace}px; }
2192         div.csc-textpic-imagecolumn.csc-textpic-lastcol, td.csc-textpic-imagecolumn.csc-textpic-lastcol .csc-textpic-image { margin-right: 0; }
2193
2194         /* Add margin from image-block to text (in case of "Text & Images") */
2195         div.csc-textpic-intext-left .csc-textpic-imagewrap,
2196         div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap {
2197                 margin-right: {$styles.content.imgtext.textMargin}px;
2198         }
2199         div.csc-textpic-intext-right .csc-textpic-imagewrap,
2200         div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap {
2201                 margin-left: {$styles.content.imgtext.textMargin}px;
2202         }
2203
2204         /* Positioning of images: */
2205
2206         /* Center (above or below) */
2207         div.csc-textpic-center .csc-textpic-imagewrap, div.csc-textpic-center figure.csc-textpic-imagewrap { overflow: hidden; }
2208         div.csc-textpic-center .csc-textpic-center-outer { position: relative; float: right; right: 50%; }
2209         div.csc-textpic-center .csc-textpic-center-inner { position: relative; float: right; right: -50%; }
2210
2211         /* Right (above or below) */
2212         div.csc-textpic-right .csc-textpic-imagewrap { float: right; }
2213         div.csc-textpic-right div.csc-textpic-text { clear: right; }
2214
2215         /* Left (above or below) */
2216         div.csc-textpic-left .csc-textpic-imagewrap { float: left; }
2217         div.csc-textpic-left div.csc-textpic-text { clear: left; }
2218
2219         /* Left (in text) */
2220         div.csc-textpic-intext-left .csc-textpic-imagewrap { float: left; }
2221
2222         /* Right (in text) */
2223         div.csc-textpic-intext-right .csc-textpic-imagewrap { float: right; }
2224
2225         /* Right (in text, no wrap around) */
2226         div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap { float: right; }
2227
2228         /* Left (in text, no wrap around) */
2229         div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap { float: left; }
2230
2231         div.csc-textpic div.csc-textpic-imagerow-last, div.csc-textpic div.csc-textpic-imagerow-none div.csc-textpic-last { margin-bottom: 0; }
2232
2233         /* Browser fixes: */
2234
2235         /* Fix for unordered and ordered list with image "In text, left" */
2236         .csc-textpic-intext-left ol, .csc-textpic-intext-left ul { padding-left: 40px; overflow: auto; }
2237
2238         /* File Links */
2239         ul.csc-uploads { padding: 0; }
2240         ul.csc-uploads li { list-style: none outside none; margin: 1em 0; }
2241         ul.csc-uploads img { float: left; margin-right: 1em; vertical-align: top; }
2242         ul.csc-uploads span { display: block; }
2243         ul.csc-uploads span.csc-uploads-fileName { text-decoration: underline; }
2244
2245         /* Table background colors: */
2246
2247         table.contenttable-color-1 { background-color: {$styles.content.table.backgroundColor.1}; }
2248         table.contenttable-color-2 { background-color: {$styles.content.table.backgroundColor.2}; }
2249         table.contenttable-color-240 { background-color: {$styles.content.table.backgroundColor.240}; }
2250         table.contenttable-color-241 { background-color: {$styles.content.table.backgroundColor.241}; }
2251         table.contenttable-color-242 { background-color: {$styles.content.table.backgroundColor.242}; }
2252         table.contenttable-color-243 { background-color: {$styles.content.table.backgroundColor.243}; }
2253         table.contenttable-color-244 { background-color: {$styles.content.table.backgroundColor.244}; }
2254 )