[SECURITY] Escape output of tt_content.default
[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                         htmlSpecialChars = 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                                 htmlSpecialChars = 1
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.htmlSpecialChars = 1
1195                         1.wrap = <li class="odd">|</li>
1196
1197                         2.current = 1
1198                         2.htmlSpecialChars = 1
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         20.innerStdWrap.br = 1
1415
1416         20.stdWrap {
1417                 editIcons = tt_content: cols, bodytext, [layout], [table_bgColor|table_border|table_cellspacing|table_cellpadding]
1418                 editIcons.beforeLastTag = 1
1419                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.table
1420
1421                 prefixComment = 2 | Table:
1422         }
1423 }
1424
1425 # ******************
1426 # CType: multimedia
1427 # ******************
1428 tt_content.multimedia = COA
1429 tt_content.multimedia {
1430         10 = < lib.stdheader
1431
1432         20 = MULTIMEDIA
1433         20.file.field = multimedia
1434         20.file.wrap = uploads/media/
1435         20.file.listNum = 0
1436         20.params.field = bodytext
1437
1438         20.stdWrap {
1439                 editIcons = tt_content: multimedia, bodytext
1440                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1441
1442                 prefixComment = 2 | Multimedia element:
1443         }
1444 }
1445
1446 # *****************
1447 # CType: swfobject
1448 # *****************
1449 tt_content.swfobject = COA
1450 tt_content.swfobject {
1451         10 = < lib.stdheader
1452
1453         20 = SWFOBJECT
1454         20 {
1455                 file =
1456                 width =
1457                 height =
1458
1459                 flexParams.field = pi_flexform
1460
1461                 alternativeContent.field = bodytext
1462
1463                 layout = ###SWFOBJECT###
1464
1465                 video {
1466                         player = {$styles.content.media.videoPlayer}
1467
1468                         defaultWidth  = {$styles.content.media.defaultVideoWidth}
1469                         defaultHeight  = {$styles.content.media.defaultVideoHeight}
1470
1471                         default {
1472                                 params.quality = high
1473                                 params.menu = false
1474                                 params.allowScriptAccess = sameDomain
1475                                 params.allowFullScreen = true
1476                         }
1477                         mapping {
1478
1479                         }
1480                 }
1481
1482                 audio {
1483                         player = {$styles.content.media.audioPlayer}
1484
1485                         defaultWidth = {$styles.content.media.defaultAudioWidth}
1486                         defaultHeight = {$styles.content.media.defaultAudioHeight}
1487
1488                         default {
1489                                 params.quality = high
1490                                 params.allowScriptAccess = sameDomain
1491                                 params.menu = false
1492                         }
1493                         mapping {
1494                                 flashvars.file = soundFile
1495                         }
1496                 }
1497
1498         }
1499         20.stdWrap {
1500                 editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext
1501                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1502
1503                 prefixComment = 2 | SWFobject element:
1504         }
1505 }
1506
1507 # *****************
1508 # CType: qtobject
1509 # *****************
1510 tt_content.qtobject = COA
1511 tt_content.qtobject {
1512         10 = < lib.stdheader
1513
1514         20 = QTOBJECT
1515         20 {
1516                 file =
1517                 width =
1518                 height =
1519
1520                 flexParams.field = pi_flexform
1521
1522                 alternativeContent.field = bodytext
1523
1524                 layout = ###QTOBJECT###
1525
1526                 video {
1527                         player = {$styles.content.media.videoPlayer}
1528
1529                         defaultWidth  = {$styles.content.media.defaultVideoWidth}
1530                         defaultHeight  = {$styles.content.media.defaultVideoHeight}
1531
1532                         default {
1533                                 params.quality = high
1534                                 params.menu = false
1535                                 params.allowScriptAccess = sameDomain
1536                                 params.allowFullScreen = true
1537                         }
1538                         mapping {
1539
1540                         }
1541                 }
1542
1543                 audio {
1544                         player = {$styles.content.media.audioPlayer}
1545
1546                         defaultWidth = {$styles.content.media.defaultAudioWidth}
1547                         defaultHeight = {$styles.content.media.defaultAudioHeight}
1548
1549                         default {
1550                                 params.quality = high
1551                                 params.allowScriptAccess = sameDomain
1552                                 params.menu = false
1553                         }
1554                         mapping {
1555                                 flashvars.file = soundFile
1556                         }
1557                 }
1558         }
1559         20.stdWrap {
1560                 editIcons = tt_content: multimedia, imagewidth, imageheight, pi_flexform, bodytext
1561                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1562
1563                 prefixComment = 2 | QTobject element:
1564         }
1565 }
1566
1567 # *****************
1568 # CType: media
1569 # *****************
1570 tt_content.media = COA
1571 tt_content.media {
1572         10 = < lib.stdheader
1573
1574         20 = MEDIA
1575         20 {
1576
1577                 flexParams.field = pi_flexform
1578                 alternativeContent < tt_content.text.20
1579                 alternativeContent.field = bodytext
1580
1581                 type = video
1582                 renderType = auto
1583                 allowEmptyUrl = 0
1584                 forcePlayer = 1
1585
1586                 fileExtHandler {
1587                         default = MEDIA
1588                         avi = MEDIA
1589                         asf = MEDIA
1590                         class = MEDIA
1591                         wmv = MEDIA
1592                         mp3 = SWF
1593                         mp4 = SWF
1594                         m4v = SWF
1595                         swa = SWF
1596                         flv = SWF
1597                         swf = SWF
1598                         mov = QT
1599                         m4v = QT
1600                         m4a = QT
1601                 }
1602
1603                 mimeConf.swfobject < tt_content.swfobject.20
1604                 mimeConf.qtobject < tt_content.qtobject.20
1605                 mimeConf.flowplayer < tt_content.swfobject.20
1606                 mimeConf.flowplayer.audio.player = {$styles.content.media.flowPlayer}
1607                 mimeConf.flowplayer.video.player = {$styles.content.media.flowPlayer}
1608
1609         }
1610         20.stdWrap {
1611                 editIcons = tt_content: pi_flexform, bodytext
1612                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.multimedia
1613
1614                 prefixComment = 2 | Media element:
1615         }
1616 }
1617
1618 # ******************
1619 # CType: mailform
1620 # ******************
1621 tt_content.mailform = COA
1622 tt_content.mailform.10 = < lib.stdheader
1623 tt_content.mailform.20 = FORM
1624 tt_content.mailform.20 {
1625         useDefaultContentObject = 1
1626         accessibility = 1
1627         noWrapAttr=1
1628         formName = mailform
1629         dontMd5FieldNames = 1
1630         layout = <div class="csc-mailform-field">###LABEL### ###FIELD###</div>
1631         labelWrap.wrap = |
1632         commentWrap.wrap = |
1633         radioWrap.wrap = |<br />
1634         radioWrap.accessibilityWrap = <fieldset###RADIO_FIELD_ID###><legend>###RADIO_GROUP_LABEL###</legend>|</fieldset>
1635         REQ = 1
1636         REQ.labelWrap.wrap = |
1637         COMMENT.layout = <div class="csc-mailform-label">###LABEL###</div>
1638         RADIO.layout = <div class="csc-mailform-field">###LABEL### <span class="csc-mailform-radio">###FIELD###</span></div>
1639         LABEL.layout = <div class="csc-mailform-field">###LABEL### <span class="csc-mailform-label">###FIELD###</span></div>
1640         target < lib.parseTarget
1641         target =
1642         target.override = {$styles.content.mailform.target}
1643         goodMess = {$styles.content.mailform.goodMess}
1644         badMess = {$styles.content.mailform.badMess}
1645         redirect.field = pages
1646         redirect.listNum = 0
1647         recipient.field = subheader
1648         data.field = bodytext
1649         locationData = 1
1650         hiddenFields.stdWrap.wrap = <div style="display:none;">|</div>
1651
1652         params.radio = class="csc-mailform-radio"
1653         params.check = class="csc-mailform-check"
1654         params.submit = class="csc-mailform-submit"
1655
1656         stdWrap.wrap = <fieldset class="csc-mailform"> | </fieldset>
1657         stdWrap {
1658                 editIcons = tt_content: bodytext, pages, subheader
1659                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.form
1660
1661                 prefixComment = 2 | Mail form inserted:
1662         }
1663 }
1664
1665
1666 # ******************
1667 # CType: search
1668 # ******************
1669 tt_content.search = COA
1670 tt_content.search.10 = < lib.stdheader
1671 # Result:
1672 tt_content.search.20 = SEARCHRESULT
1673 tt_content.search.20 {
1674         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
1675         languageField.tt_content = sys_language_uid
1676         renderObj = COA
1677         renderObj {
1678
1679                 10 = TEXT
1680                 10.field = pages_title
1681                 10.htmlSpecialChars = 1
1682                 10.typolink {
1683                         parameter.field = uid
1684                         target < lib.parseTarget
1685                         target =
1686                         target.override = {$styles.content.searchresult.resultTarget}
1687                         additionalParams.data = register:SWORD_PARAMS
1688                         additionalParams.required = 1
1689                         additionalParams.wrap = &no_cache=1
1690                 }
1691                 10.htmlSpecialChars = 1
1692                 10.wrap = <h3 class="csc-searchResultHeader">|</h3>
1693
1694                 20 = COA
1695                 20 {
1696                         10 = TEXT
1697                         10.field = tt_content_bodytext
1698                         10.stripHtml = 1
1699                         10.htmlSpecialChars = 1
1700                 }
1701                 20.stdWrap.crop = 200 | ...
1702                 20.stdWrap.wrap = <p class="csc-searchResult">|</p>
1703         }
1704
1705         layout = COA
1706         layout {
1707                 wrap = <table border="0" cellspacing="0" cellpadding="2" class="csc-searchResultInfo"><tr> | </tr></table> ###RESULT###
1708
1709                 10 = TEXT
1710                 10.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.resultRange
1711                 10.wrap = <td class="csc-searchResultRange"><p>|</p></td>
1712
1713                 20 = TEXT
1714                 20.value = ###PREV###&nbsp;&nbsp;&nbsp;###NEXT###
1715                 20.wrap = <td class="csc-searchResultPrevNext"><p>|</p></td>
1716         }
1717
1718         noResultObj = COA
1719         noResultObj {
1720                 10 = TEXT
1721                 10.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.emptySearch
1722                 10.wrap = <h3 class="csc-noSearchResultMsg">|</h3>
1723         }
1724
1725         next = TEXT
1726         next.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchResultNext
1727
1728         prev = TEXT
1729         prev.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchResultPrev
1730
1731         target < lib.parseTarget
1732         target =
1733         target.override = {$styles.content.searchresult.target}
1734
1735         range = 20
1736
1737         stdWrap.prefixComment = 2 | Search result:
1738 }
1739
1740 # Form:
1741 tt_content.search.30 < tt_content.mailform.20
1742 tt_content.search.30 {
1743         goodMess = {$styles.content.searchform.goodMess}
1744         redirect >
1745         recipient >
1746         data >
1747         dataArray {
1748                 10.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchWord
1749                 10.type = sword=input
1750                 20.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchIn
1751                 20.type = scols=select
1752                 20.valueArray {
1753                         10.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.headersKeywords
1754                         10.value = pages.title-subtitle-keywords-description:tt_content.header
1755                         20.label.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.pageContent
1756                         20.value = tt_content.header-bodytext-imagecaption
1757                 }
1758                 30.type = stype=hidden
1759                 30.value = L0
1760                 40.type = submit=submit
1761                 40.value.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:search.searchButton
1762         }
1763         type.field = pages
1764         type.listNum = 0
1765         locationData = HTTP_POST_VARS
1766         no_cache = 1
1767
1768         stdWrap.wrap = <table border="0" cellspacing="1" cellpadding="1" class="csc-searchform">  | </table>
1769         stdWrap {
1770                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.search
1771
1772                 prefixComment = 2 | Search form inserted:
1773         }
1774 }
1775
1776
1777 # ****************
1778 # CType: menu
1779 # ****************
1780 tt_content.menu = COA
1781 tt_content.menu {
1782         10 = < lib.stdheader
1783
1784         20 = CASE
1785         20 {
1786                 key.field = menu_type
1787
1788                 # "Menu of these pages"
1789                 default = HMENU
1790                 default {
1791                         special = list
1792                         special.value.field = pages
1793                         stdWrap {
1794                                 prepend = COA
1795                                 prepend {
1796                                         stdWrap {
1797                                                 if.isTrue.field = accessibility_bypass
1798                                         }
1799                                         10 = LOAD_REGISTER
1800                                         10 {
1801                                                 accessibility_bypass_text = TEXT
1802                                                 accessibility_bypass_text {
1803                                                         field = accessibility_bypass_text
1804                                                 }
1805                                         }
1806                                         20 = CONTENT
1807                                         20 {
1808                                                 table = tt_content
1809                                                 select {
1810                                                         pidInList = this
1811                                                         orderBy = sorting
1812                                                         where {
1813                                                                 dataWrap = sorting>{field:sorting}
1814                                                         }
1815                                                         languageField = sys_language_uid
1816                                                         max = 1
1817                                                 }
1818                                                 renderObj = TEXT
1819                                                 renderObj {
1820                                                         required = 1
1821                                                         data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:menu.bypassNavigation
1822                                                         override.data = register:accessibility_bypass_text
1823                                                         trim = 1
1824                                                         htmlSpecialChars = 1
1825                                                         typolink {
1826                                                                 parameter {
1827                                                                         field = pid
1828                                                                 }
1829                                                                 section {
1830                                                                         field = uid
1831                                                                 }
1832                                                         }
1833                                                         wrap = <li class="csc-nav-bypass">|</li>
1834                                                 }
1835                                         }
1836                                         30 = RESTORE_REGISTER
1837                                 }
1838                                 outerWrap = <ul class="csc-menu csc-menu-def">|</ul>
1839                                 required = 1
1840                         }
1841                         1 = TMENU
1842                         1 {
1843                                 target < lib.parseTarget
1844                                 target =
1845                                 target.override = {$PAGE_TARGET}
1846                                 NO {
1847                                         stdWrap.htmlSpecialChars = 1
1848                                         wrapItemAndSub = <li>|</li>
1849                                         ATagTitle.field = description // title
1850                                 }
1851                         }
1852                 }
1853
1854                 # "Menu of subpages to these pages"
1855                 1 < .default
1856                 1 {
1857                         special = directory
1858                         stdWrap {
1859                                 outerWrap = <ul class="csc-menu csc-menu-1">|</ul>
1860                         }
1861                 }
1862
1863                 # "Sitemap - liststyle"
1864                 2 = HMENU
1865                 2 {
1866                         stdWrap < tt_content.menu.20.default.stdWrap
1867                         stdWrap {
1868                                 outerWrap = <div class="csc-sitemap">|</div>
1869                         }
1870                         1 = TMENU
1871                         1 {
1872                                 target < lib.parseTarget
1873                                 target =
1874                                 target.override = {$PAGE_TARGET}
1875                                 expAll = 1
1876                                 wrap = <ul>|</ul>
1877                                 NO {
1878                                         stdWrap.htmlSpecialChars = 1
1879                                         wrapItemAndSub = <li>|</li>
1880                                         ATagTitle.field = description // title
1881                                 }
1882                         }
1883                         2 < .1
1884                         3 < .1
1885                         4 < .1
1886                         5 < .1
1887                         6 < .1
1888                         7 < .1
1889                 }
1890
1891                 # "Section index (pagecontent w/Index checked - liststyle)"
1892                 3 < .default
1893                 3 {
1894                         special {
1895                                 value {
1896                                         override {
1897                                                 data = page:uid
1898                                                 if {
1899                                                         isFalse.field = pages
1900                                                 }
1901                                         }
1902                                 }
1903                         }
1904                         stdWrap {
1905                                 outerWrap = <ul class="csc-menu csc-menu-3">|</ul>
1906                         }
1907                         1 = TMENU
1908                         1 {
1909                                 sectionIndex = 1
1910                                 sectionIndex.type = header
1911                                 NO.wrapItemAndSub = <li class="csc-section">|</li>
1912                         }
1913                 }
1914
1915                 # "Menu of subpages to these pages (with abstract)"
1916                 4 < .1
1917                 4 {
1918                         stdWrap {
1919                                 prepend.20.renderObj.wrap = <dt class="csc-nav-bypass">|</dt><dd>&nbsp;</dd>
1920                                 outerWrap = <dl class="csc-menu csc-menu-4">|</dl>
1921                         }
1922                         1.NO {
1923                                 wrapItemAndSub >
1924                                 linkWrap = <dt>|</dt>
1925                                 after {
1926                                         cObject = TEXT
1927                                         cObject {
1928                                                 data = field : abstract // field : description // field : subtitle
1929                                                 htmlSpecialChars = 1
1930                                                 required = 1
1931                                         }
1932                                         ifBlank = &nbsp;
1933                                         wrap = <dd>|</dd>
1934                                 }
1935                                 ATagTitle.field = description // title
1936                         }
1937                 }
1938
1939                 # "Recently updated pages"
1940                 5 < .default
1941                 5 {
1942                         stdWrap {
1943                                 outerWrap = <ul class="csc-menu csc-menu-5">|</ul>
1944                         }
1945                         special = updated
1946                         special {
1947                                 maxAge = 3600*24*7
1948                                 excludeNoSearchPages = 1
1949                         }
1950                 }
1951
1952                 # "Related pages (based on keywords)"
1953                 6 < .default
1954                 6 {
1955                         stdWrap {
1956                                 outerWrap = <ul class="csc-menu csc-menu-6">|</ul>
1957                         }
1958                         special = keywords
1959                         special {
1960                                 excludeNoSearchPages = 1
1961                         }
1962                 }
1963
1964                 # "Menu of subpages to these pages + sections - liststyle"
1965                 7 < .1
1966                 7 {
1967                         stdWrap {
1968                                 outerWrap = <ul class="csc-menu csc-menu-7">|</ul>
1969                         }
1970                         1.expAll = 1
1971                         2 < .1
1972                         2 {
1973                                 sectionIndex = 1
1974                                 sectionIndex.type = header
1975                                 wrap = <ul>|</ul>
1976                                 NO.wrapItemAndSub = <li class="csc-section">|</li>
1977                         }
1978                 }
1979
1980                 # "Sitemaps of selected pages - liststyle"
1981                 8 < .2
1982                 8 {
1983                         special = directory
1984                         special.value.field = pages
1985                 }
1986
1987                 # Menu of categorized pages
1988                 categorized_pages < .default
1989                 categorized_pages {
1990                         special = categories
1991                         special.value.field = selected_categories
1992                         special.relation.field = category_field
1993                         special.sorting = title
1994                         special.order = asc
1995                         stdWrap {
1996                                 outerWrap = <ul class="csc-menu csc-menu-categorized-pages">|</ul>
1997                         }
1998                 }
1999
2000                 # Menu of categorized content elements
2001                 categorized_content = RECORDS
2002                 categorized_content {
2003                         categories.field = selected_categories
2004                         categories.relation.field = category_field
2005                         tables = tt_content
2006                         conf.tt_content = TEXT
2007                         conf.tt_content {
2008                                 field = header
2009                                 typolink.parameter = {field:pid}#{field:uid}
2010                                 typolink.parameter.insertData = 1
2011                                 wrap = <li>|</li>
2012                         }
2013                         wrap = <ul>|</ul>
2014                 }
2015         }
2016
2017         20.stdWrap {
2018                 wrap {
2019                         cObject = COA
2020                         cObject {
2021                                 10 = TEXT
2022                                 10 {
2023                                         field = accessibility_title
2024                                         htmlSpecialChars = 1
2025                                         dataWrap = <map id="map{field:uid}" title="|">
2026                                         dataWrap {
2027                                                 override = <map name="map{field:uid}" title="|">
2028                                                 override {
2029                                                         if {
2030                                                                 isFalse.data = TSFE:xhtmlDoctype
2031                                                         }
2032                                                 }
2033                                         }
2034                                 }
2035
2036                                 20 = TEXT
2037                                 20 {
2038                                         value = |</map>
2039                                 }
2040                         }
2041                         if {
2042                                 isTrue {
2043                                         field = accessibility_title
2044                                 }
2045                         }
2046                 }
2047                 editIcons = tt_content: menu_type, pages
2048                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.menuSitemap
2049
2050                 prefixComment = 2 | Menu/Sitemap element:
2051         }
2052 }
2053
2054
2055
2056 # ****************
2057 # CType: shortcut
2058 # ****************
2059 # Should be a complete copy from the old static template "content (default)"
2060 tt_content.shortcut = COA
2061 tt_content.shortcut {
2062
2063         20 = RECORDS
2064         20 {
2065                 source.field = records
2066                 tables = {$content.shortcut.tables}
2067         }
2068
2069         20.stdWrap {
2070                 editIcons = tt_content: records
2071                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.recordList
2072
2073                 prefixComment = 2 | Inclusion of other records (by reference):
2074         }
2075 }
2076
2077
2078 # ****************
2079 # CType: list
2080 # ****************
2081 # Should be a complete copy from the old static template "content (default)" (except "lib.stdheader")
2082 tt_content.list = COA
2083 tt_content.list {
2084         10 = < lib.stdheader
2085
2086         20 = CASE
2087         20.key.field = list_type
2088
2089         20.stdWrap {
2090                 editIcons = tt_content: list_type, layout, select_key, pages [recursive]
2091                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.plugin
2092
2093                 prefixComment = 2 | Plugin inserted:
2094         }
2095 }
2096
2097
2098 # ****************
2099 # CType: div
2100 # ****************
2101 tt_content.div = TEXT
2102 tt_content.div {
2103         value = <hr>
2104         override = <hr />
2105         override.if {
2106                 isTrue.data = TSFE:xhtmlDoctype
2107         }
2108         wrap = <div class="divider">|</div>
2109         prefixComment = 2 | Div element
2110 }
2111
2112
2113 # ****************
2114 # CType: html
2115 # ****************
2116 # This truely IS a content object, launched from inside the PHP class of course.
2117 # Should be a complete copy from the old static template "content (default)"
2118 tt_content.html = TEXT
2119 tt_content.html {
2120         field = bodytext
2121
2122         editIcons = tt_content:bodytext
2123         editIcons.beforeLastTag = 1
2124         editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.html
2125
2126         prefixComment = 2 | Raw HTML content:
2127 }
2128
2129
2130 # ****************
2131 # Default error msg:
2132 # ****************
2133 tt_content.default = TEXT
2134 tt_content.default {
2135         field = CType
2136         wrap = <p style="background-color: yellow;"><b>ERROR:</b> Content Element type "|" has no rendering definition!</p>
2137         htmlSpecialChars = 1
2138
2139         prefixComment = 2 | Unknown element message:
2140 }
2141
2142 # *********************************************************************
2143 # ACCESSIBILTY MODE
2144 # *********************************************************************
2145
2146
2147
2148
2149
2150
2151
2152 plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE (
2153         /* Headers */
2154         .csc-header-alignment-center { text-align: center; }
2155         .csc-header-alignment-right { text-align: right; }
2156         .csc-header-alignment-left { text-align: left; }
2157
2158         div.csc-textpic-responsive, div.csc-textpic-responsive * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;  }
2159
2160         /* Clear floats after csc-textpic and after csc-textpic-imagerow */
2161         div.csc-textpic, div.csc-textpic div.csc-textpic-imagerow, ul.csc-uploads li { overflow: hidden; }
2162
2163         /* Set padding for tables */
2164         div.csc-textpic .csc-textpic-imagewrap table { border-collapse: collapse; border-spacing: 0; }
2165         div.csc-textpic .csc-textpic-imagewrap table tr td { padding: 0; vertical-align: top; }
2166
2167         /* Settings for figure and figcaption (HTML5) */
2168         div.csc-textpic .csc-textpic-imagewrap figure, div.csc-textpic figure.csc-textpic-imagewrap { margin: 0; display: table; }
2169
2170         /* Captions */
2171         figcaption.csc-textpic-caption { display: table-caption; }
2172         .csc-textpic-caption { text-align: left; caption-side: bottom; }
2173         div.csc-textpic-caption-c .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-c { text-align: center; }
2174         div.csc-textpic-caption-r .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-r { text-align: right; }
2175         div.csc-textpic-caption-l .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-l { text-align: left; }
2176
2177         /* Float the columns */
2178         div.csc-textpic div.csc-textpic-imagecolumn { float: left; }
2179
2180         /* Border just around the image */
2181         {$styles.content.imgtext.borderSelector} {
2182                 border: {$styles.content.imgtext.borderThick}px solid {$styles.content.imgtext.borderColor};
2183                 padding: {$styles.content.imgtext.borderSpace}px {$styles.content.imgtext.borderSpace}px;
2184         }
2185
2186         div.csc-textpic .csc-textpic-imagewrap img { border: none; display: block; }
2187
2188         /* Space below each image (also in-between rows) */
2189         div.csc-textpic .csc-textpic-imagewrap .csc-textpic-image { margin-bottom: {$styles.content.imgtext.rowSpace}px; }
2190         div.csc-textpic .csc-textpic-imagewrap .csc-textpic-imagerow-last .csc-textpic-image { margin-bottom: 0; }
2191
2192         /* colSpace around image columns, except for last column */
2193         div.csc-textpic-imagecolumn, td.csc-textpic-imagecolumn .csc-textpic-image { margin-right: {$styles.content.imgtext.colSpace}px; }
2194         div.csc-textpic-imagecolumn.csc-textpic-lastcol, td.csc-textpic-imagecolumn.csc-textpic-lastcol .csc-textpic-image { margin-right: 0; }
2195
2196         /* Add margin from image-block to text (in case of "Text & Images") */
2197         div.csc-textpic-intext-left .csc-textpic-imagewrap,
2198         div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap {
2199                 margin-right: {$styles.content.imgtext.textMargin}px;
2200         }
2201         div.csc-textpic-intext-right .csc-textpic-imagewrap,
2202         div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap {
2203                 margin-left: {$styles.content.imgtext.textMargin}px;
2204         }
2205
2206         /* Positioning of images: */
2207
2208         /* Center (above or below) */
2209         div.csc-textpic-center .csc-textpic-imagewrap, div.csc-textpic-center figure.csc-textpic-imagewrap { overflow: hidden; }
2210         div.csc-textpic-center .csc-textpic-center-outer { position: relative; float: right; right: 50%; }
2211         div.csc-textpic-center .csc-textpic-center-inner { position: relative; float: right; right: -50%; }
2212
2213         /* Right (above or below) */
2214         div.csc-textpic-right .csc-textpic-imagewrap { float: right; }
2215         div.csc-textpic-right div.csc-textpic-text { clear: right; }
2216
2217         /* Left (above or below) */
2218         div.csc-textpic-left .csc-textpic-imagewrap { float: left; }
2219         div.csc-textpic-left div.csc-textpic-text { clear: left; }
2220
2221         /* Left (in text) */
2222         div.csc-textpic-intext-left .csc-textpic-imagewrap { float: left; }
2223
2224         /* Right (in text) */
2225         div.csc-textpic-intext-right .csc-textpic-imagewrap { float: right; }
2226
2227         /* Right (in text, no wrap around) */
2228         div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap { float: right; }
2229
2230         /* Left (in text, no wrap around) */
2231         div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap { float: left; }
2232
2233         div.csc-textpic div.csc-textpic-imagerow-last, div.csc-textpic div.csc-textpic-imagerow-none div.csc-textpic-last { margin-bottom: 0; }
2234
2235         /* Browser fixes: */
2236
2237         /* Fix for unordered and ordered list with image "In text, left" */
2238         .csc-textpic-intext-left ol, .csc-textpic-intext-left ul { padding-left: 40px; overflow: auto; }
2239
2240         /* File Links */
2241         ul.csc-uploads { padding: 0; }
2242         ul.csc-uploads li { list-style: none outside none; margin: 1em 0; }
2243         ul.csc-uploads img { float: left; margin-right: 1em; vertical-align: top; }
2244         ul.csc-uploads span { display: block; }
2245         ul.csc-uploads span.csc-uploads-fileName { text-decoration: underline; }
2246
2247         /* Table background colors: */
2248
2249         table.contenttable-color-1 { background-color: {$styles.content.table.backgroundColor.1}; }
2250         table.contenttable-color-2 { background-color: {$styles.content.table.backgroundColor.2}; }
2251         table.contenttable-color-240 { background-color: {$styles.content.table.backgroundColor.240}; }
2252         table.contenttable-color-241 { background-color: {$styles.content.table.backgroundColor.241}; }
2253         table.contenttable-color-242 { background-color: {$styles.content.table.backgroundColor.242}; }
2254         table.contenttable-color-243 { background-color: {$styles.content.table.backgroundColor.243}; }
2255         table.contenttable-color-244 { background-color: {$styles.content.table.backgroundColor.244}; }
2256 )