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