[BUGFIX] Treat <pre> tags correctly in RTE
[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, pre
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                         crop.data = file:current:crop
716
717                         JSwindow = 1
718                         JSwindow.newWindow = {$styles.content.imgtext.linkWrap.newWindow}
719                         JSwindow.if.isFalse = {$styles.content.imgtext.linkWrap.lightboxEnabled}
720
721                         directImageLink = {$styles.content.imgtext.linkWrap.lightboxEnabled}
722
723                         enable.field = image_zoom
724                         enable.ifEmpty.typolink.parameter.data = file:current:link
725                         enable.ifEmpty.typolink.returnLast = url
726
727                         typolink.parameter.data = file:current:link
728
729                         typolink.target < lib.parseTarget
730                         typolink.target =
731                         typolink.target.override = {$styles.content.links.target}
732
733                         typolink.extTarget < lib.parseTarget
734                         typolink.extTarget =
735                         typolink.extTarget.override = {$styles.content.links.extTarget}
736
737                         linkParams.ATagParams.dataWrap =  class="{$styles.content.imgtext.linkWrap.lightboxCssClass}" rel="{$styles.content.imgtext.linkWrap.lightboxRelAttribute}"
738                 }
739
740                 altText = TEXT
741                 altText {
742                         data = file:current:alternative
743                         stripHtml = 1
744                 }
745
746                 titleText < .altText
747                 titleText.data = file:current:title
748
749                 longdescURL {
750                         parameter {
751                                 field = longdescURL
752                                 split {
753                                         token {
754                                                 char = 10
755                                         }
756                                         returnKey.data = register : IMAGE_NUM_CURRENT
757                                 }
758                         }
759                 }
760
761                 emptyTitleHandling = {$styles.content.imgtext.emptyTitleHandling}
762                 titleInLink = {$styles.content.imgtext.titleInLink}
763                 titleInLinkAndImg = {$styles.content.imgtext.titleInLinkAndImg}
764         }
765
766         textPos.field = imageorient
767         maxW = {$styles.content.imgtext.maxW}
768         maxW.override.data = register:maxImageWidth
769         maxWInText = {$styles.content.imgtext.maxWInText}
770         maxWInText.override.data = register:maxImageWidthInText
771
772         equalH.field = imageheight
773
774         image_compression.field = image_compression
775         image_effects.field = image_effects
776
777         noRows.field = image_noRows
778
779         cols.field = imagecols
780         border.field = imageborder
781
782         caption {
783                 1 = COA
784                 1 {
785                         1 = TEXT
786                         1 {
787                                 data = file:current:description
788                                 required = 1
789                                 htmlSpecialChars = 1
790                                 br = 1
791                         }
792                 }
793         }
794
795         captionAlign.field = imagecaption_position
796
797         // This needs to be set to TRUE because otherwise render_textpic will
798         // render a global caption which we do not have.
799         imageTextSplit = 1
800
801         borderThick = {$styles.content.imgtext.borderThick}
802         borderClass = {$styles.content.imgtext.borderClass}
803         colSpace = {$styles.content.imgtext.colSpace}
804         textMargin = {$styles.content.imgtext.textMargin}
805
806         borderSpace = {$styles.content.imgtext.borderSpace}
807         separateRows = {$styles.content.imgtext.separateRows}
808         addClasses =
809         addClassesCol =
810         addClassesCol.ifEmpty = csc-textpic-firstcol csc-textpic-lastcol
811         addClassesCol.override = csc-textpic-firstcol |*| |*| csc-textpic-lastcol
812         addClassesCol.override.if {
813                 isGreaterThan.field = imagecols
814                 value = 1
815         }
816
817         addClassesImage = csc-textpic-first |*| |*| csc-textpic-last
818
819         #
820         imageStdWrap.dataWrap = <div class="csc-textpic-imagewrap" style="width:{register:totalwidth}px;"> | </div>
821         imageStdWrapNoWidth.wrap = <div class="csc-textpic-imagewrap"> | </div>
822
823         # if noRows is set, wrap around each column:
824         imageColumnStdWrap.dataWrap = <div class="csc-textpic-imagecolumn" style="width:{register:columnwidth}px;"> | </div>
825
826         layout = CASE
827         layout {
828                 key.field = imageorient
829                 # above-center
830                 default = TEXT
831                 default {
832                         value = <div class="csc-textpic csc-textpic-center csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
833                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-center csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
834                         override {
835                                 if {
836                                         value = default
837                                         equals = {$styles.content.imgtext.layoutKey}
838                                         negate = 1
839                                 }
840                         }
841                 }
842                 # above-right
843                 1 = TEXT
844                 1 {
845                         value = <div class="csc-textpic csc-textpic-right csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
846                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-right csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
847                         override {
848                                 if {
849                                         value = default
850                                         equals = {$styles.content.imgtext.layoutKey}
851                                         negate = 1
852                                 }
853                         }
854                 }
855                 # above-left
856                 2 = TEXT
857                 2 {
858                         value = <div class="csc-textpic csc-textpic-left csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
859                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-left csc-textpic-above###CLASSES###">###IMAGES######TEXT###</div>
860                         override {
861                                 if {
862                                         value = default
863                                         equals = {$styles.content.imgtext.layoutKey}
864                                         negate = 1
865                                 }
866                         }
867                 }
868                 # below-center
869                 8 = TEXT
870                 8 {
871                         value = <div class="csc-textpic csc-textpic-center csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
872                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-center csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
873                         override {
874                                 if {
875                                         value = default
876                                         equals = {$styles.content.imgtext.layoutKey}
877                                         negate = 1
878                                 }
879                         }
880                 }
881                 # below-right
882                 9 = TEXT
883                 9 {
884                         value = <div class="csc-textpic csc-textpic-right csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
885                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-right csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
886                         override {
887                                 if {
888                                         value = default
889                                         equals = {$styles.content.imgtext.layoutKey}
890                                         negate = 1
891                                 }
892                         }
893                 }
894                 # below-left
895                 10 = TEXT
896                 10 {
897                         value = <div class="csc-textpic csc-textpic-left csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
898                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-left csc-textpic-below###CLASSES###">###TEXT######IMAGES###</div>
899                         override {
900                                 if {
901                                         value = default
902                                         equals = {$styles.content.imgtext.layoutKey}
903                                         negate = 1
904                                 }
905                         }
906                 }
907                 # intext-right
908                 17 = TEXT
909                 17 {
910                         value = <div class="csc-textpic csc-textpic-intext-right###CLASSES###">###IMAGES######TEXT###</div>
911                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-right###CLASSES###">###IMAGES######TEXT###</div>
912                         override {
913                                 if {
914                                         value = default
915                                         equals = {$styles.content.imgtext.layoutKey}
916                                         negate = 1
917                                 }
918                         }
919                 }
920                 # intext-left
921                 18 = TEXT
922                 18 {
923                         value = <div class="csc-textpic csc-textpic-intext-left###CLASSES###">###IMAGES######TEXT###</div>
924                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-left###CLASSES###">###IMAGES######TEXT###</div>
925                         override {
926                                 if {
927                                         value = default
928                                         equals = {$styles.content.imgtext.layoutKey}
929                                         negate = 1
930                                 }
931                         }
932                 }
933                 # intext-right-nowrap
934                 25 = TEXT
935                 25 {
936                         value = <div class="csc-textpic csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES######TEXT###</div>
937                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-right-nowrap###CLASSES###">###IMAGES######TEXT###</div>
938                         override {
939                                 if {
940                                         value = default
941                                         equals = {$styles.content.imgtext.layoutKey}
942                                         negate = 1
943                                 }
944                         }
945                 }
946                 # intext-left-nowrap
947                 26 = TEXT
948                 26 {
949                         value = <div class="csc-textpic csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES######TEXT###</div>
950                         override = <div class="csc-textpic csc-textpic-responsive csc-textpic-intext-left-nowrap###CLASSES###">###IMAGES######TEXT###</div>
951                         override {
952                                 if {
953                                         value = default
954                                         equals = {$styles.content.imgtext.layoutKey}
955                                         negate = 1
956                                 }
957                         }
958                 }
959         }
960
961         rendering {
962                 # Single image - No caption
963                 singleNoCaption {
964                         # Choose another rendering for special edge cases
965                         fallbackRendering = COA
966                         fallbackRendering {
967                                 # Single image - Caption
968                                 10 = TEXT
969                                 10 {
970                                         if {
971                                                 isTrue.data = file:current:description
972                                                 value = 1
973                                                 equals.data = register:imageCount
974                                         }
975                                         value = singleCaption
976                                 }
977
978                                 # Multiple images and split caption
979                                 20 = TEXT
980                                 20 {
981                                         if {
982                                                 value = 1
983                                                 isGreaterThan.data = register:imageCount
984                                                 isTrue.if.isFalse.data = register:renderGlobalCaption
985                                                 isTrue.data = register:allImageCaptions
986                                         }
987                                         value = splitCaption
988                                 }
989
990                                 # Multiple images and no caption at all
991                                 40 = TEXT
992                                 40 {
993                                         if {
994                                                 value = 1
995                                                 isGreaterThan.data = register:imageCount
996                                                 isFalse.data = register:allImageCaptions
997                                         }
998                                         value = noCaption
999                                 }
1000                         }
1001                         allStdWrap {
1002                                 dataWrap = <div class="csc-textpic-imagewrap"> | </div>
1003                                 dataWrap {
1004                                         override = <div class="csc-textpic-imagewrap" data-csc-images="{register:imageCount}" data-csc-cols="{field:imagecols}"> | </div>
1005                                         override {
1006                                                 if {
1007                                                         value = html5
1008                                                         equals.data = TSFE:config|config|doctype
1009                                                 }
1010                                         }
1011                                 }
1012                                 innerWrap.cObject = CASE
1013                                 innerWrap.cObject {
1014                                         key.field = imageorient
1015                                         # above-center
1016                                         0 = TEXT
1017                                         0.value = <div class="csc-textpic-center-outer"><div class="csc-textpic-center-inner"> | </div></div>
1018                                         # below-center
1019                                         8 < .0
1020                                 }
1021                         }
1022                         singleStdWrap {
1023                                 wrap = <div class="csc-textpic-image###CLASSES###"> | </div>
1024                                 wrap {
1025                                         override = <figure class="csc-textpic-image###CLASSES###"> | </figure>
1026                                         override {
1027                                                 if {
1028                                                         value = html5
1029                                                         equals.data = TSFE:config|config|doctype
1030                                                 }
1031                                         }
1032                                 }
1033                         }
1034                         rowStdWrap.wrap = |
1035                         noRowsStdWrap.wrap = |
1036                         lastRowStdWrap.wrap = |
1037                         columnStdWrap.wrap = |
1038                         imgTagStdWrap.wrap = |
1039                         editIconsStdWrap.wrap = <div> | </div>
1040                         caption.wrap = |
1041                 }
1042                 noCaption {
1043                         # Multiple images and no caption at all
1044                         fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
1045                         allStdWrap {
1046                                 dataWrap = <div class="csc-textpic-imagewrap"> | </div>
1047                                 dataWrap {
1048                                         override = <div class="csc-textpic-imagewrap" data-csc-images="{register:imageCount}" data-csc-cols="{field:imagecols}"> | </div>
1049                                         override {
1050                                                 if {
1051                                                         value = html5
1052                                                         equals.data = TSFE:config|config|doctype
1053                                                 }
1054                                         }
1055                                 }
1056                         }
1057                         singleStdWrap {
1058                                 wrap = <div class="csc-textpic-image###CLASSES###"> | </div>
1059                                 wrap {
1060                                         override = <figure class="csc-textpic-image###CLASSES###"> | </figure>
1061                                 }
1062                         }
1063                         rowStdWrap.wrap = <div class="csc-textpic-imagerow"> | </div>
1064                         noRowsStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-none"> | </div>
1065                         lastRowStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last"> | </div>
1066                         columnStdWrap.wrap = <div class="csc-textpic-imagecolumn###CLASSES###"> | </div>
1067                 }
1068                 singleCaption {
1069                         # Just one image with a caption
1070                         fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
1071                         singleStdWrap {
1072                                 wrap = <div class="csc-textpic-image###CLASSES###"><table>###CAPTION###<tbody><tr><td> | </td></tr></tbody></table></div>
1073                                 wrap {
1074                                         override = <figure class="csc-textpic-image###CLASSES###">|###CAPTION###</figure>
1075                                         override {
1076                                                 if {
1077                                                         value = html5
1078                                                         equals.data = TSFE:config|config|doctype
1079                                                 }
1080                                         }
1081                                 }
1082                         }
1083                         caption {
1084                                 required = 1
1085                                 wrap = <caption class="csc-textpic-caption###CLASSES###"> | </caption>
1086                                 wrap {
1087                                         override = <figcaption class="csc-textpic-caption###CLASSES###"> | </figcaption>
1088                                         override {
1089                                                 if {
1090                                                         value = html5
1091                                                         equals.data = TSFE:config|config|doctype
1092                                                 }
1093                                         }
1094                                 }
1095                         }
1096                 }
1097                 splitCaption {
1098                         fallbackRendering < tt_content.image.20.rendering.singleNoCaption.fallbackRendering.10
1099                         singleStdWrap {
1100                                 wrap = <div class="csc-textpic-image###CLASSES###"><table>###CAPTION###<tbody><tr><td> | </td></tr></tbody></table></div>
1101                                 wrap {
1102                                         override = <figure class="csc-textpic-image###CLASSES###">|###CAPTION###</figure>
1103                                         override {
1104                                                 if {
1105                                                         value = html5
1106                                                         equals.data = TSFE:config|config|doctype
1107                                                 }
1108                                         }
1109                                 }
1110                         }
1111                         rowStdWrap.wrap = <div class="csc-textpic-imagerow"> | </div>
1112                         noRowsStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-none"> | </div>
1113                         lastRowStdWrap.wrap = <div class="csc-textpic-imagerow csc-textpic-imagerow-last"> | </div>
1114                         columnStdWrap.wrap = <div class="csc-textpic-imagecolumn###CLASSES###"> | </div>
1115                         caption {
1116                                 required = 1
1117                                 wrap = <caption class="csc-textpic-caption###CLASSES###"> | </caption>
1118                                 wrap {
1119                                         override = <figcaption class="csc-textpic-caption###CLASSES###"> | </figcaption>
1120                                         override {
1121                                                 if {
1122                                                         value = html5
1123                                                         equals.data = TSFE:config|config|doctype
1124                                                 }
1125                                         }
1126                                 }
1127                         }
1128                 }
1129         }
1130         renderMethod = singleNoCaption
1131
1132         editIcons = tt_content : image [imageorient|imagewidth|imageheight],[imagecols|image_noRows|imageborder],[image_zoom],[image_compression|image_effects|image_frames],[imagecaption_position]
1133         editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.images
1134
1135         caption.editIcons = tt_content : imagecaption_position
1136         caption.editIcons.beforeLastTag=1
1137         caption.editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.caption_position
1138
1139         stdWrap.prefixComment = 2 | Image block:
1140 }
1141
1142 # *****************
1143 # CType: textpic
1144 # *****************
1145 tt_content.textpic = COA
1146 tt_content.textpic {
1147         10 = COA
1148         10.if.value = 25
1149         10.if.isLessThan.field = imageorient
1150         10.10 = < lib.stdheader
1151
1152         20  = < tt_content.image.20
1153         20 {
1154                 text.10 = COA
1155                 text.10 {
1156                         if.value = 24
1157                         if.isGreaterThan.field = imageorient
1158                         10 = < lib.stdheader
1159                         10.stdWrap.dataWrap = <div class="csc-textpicHeader csc-textpicHeader-{field:imageorient}">|</div>
1160                 }
1161                 text.20 = < tt_content.text.20
1162                 text.wrap = <div class="csc-textpic-text"> | </div>
1163         }
1164 }
1165
1166
1167
1168 # *****************
1169 # CType: bullet
1170 # *****************
1171 tt_content.bullets = COA
1172 tt_content.bullets {
1173         10 = < lib.stdheader
1174
1175         20 = TEXT
1176         20 {
1177                 field = bodytext
1178                 trim = 1
1179                 split{
1180                         token.char = 10
1181                         cObjNum = |*|1|| 2|*|
1182                         1.current = 1
1183                         1.htmlSpecialChars = 1
1184                         1.wrap = <li class="odd">|</li>
1185
1186                         2.current = 1
1187                         2.htmlSpecialChars = 1
1188                         2.wrap = <li class="even">|</li>
1189                 }
1190                 dataWrap = <ul class="csc-bulletlist csc-bulletlist-{field:layout}">|</ul>
1191                 editIcons = tt_content: bodytext, [layout]
1192                 editIcons.beforeLastTag = 1
1193                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.xlf:eIcon.bullets
1194
1195                 prefixComment = 2 | Bullet list:
1196         }
1197 }
1198
1199
1200 # *****************
1201 # CType: uploads
1202 # *****************
1203 tt_content.uploads = COA
1204 tt_content.uploads {
1205         10 = < lib.stdheader
1206
1207         20 = FILES
1208         20 {
1209                 # get from file references:
1210                 references {
1211                         table = tt_content
1212                         fieldName = media
1213                 }
1214
1215                 collections.field = file_collections
1216
1217                 # get from path (backwards compatibility, contains strings like "fileadmin/user_uploads/")
1218                 folders.field = select_key
1219
1220                 sorting.field = filelink_sorting
1221
1222                 # render the files
1223                 renderObj = COA
1224                 renderObj {
1225                         10 = IMAGE
1226                         10 {
1227                                 file.import.data = file:current:originalUid // file:current:uid
1228                                 file.width = 150
1229                                 stdWrap {
1230                                         if.value = 1
1231                                         if.isGreaterThan.field = layout
1232
1233                                         typolink {
1234                                                 parameter.data = file:current:originalUid // file:current:uid
1235                                                 parameter.wrap = file:|
1236                                                 fileTarget < lib.parseTarget
1237                                                 fileTarget =
1238                                                 fileTarget.override = {$styles.content.uploads.target}
1239                                                 fileTarget.override.override.field = target
1240                                                 removePrependedNumbers = 1
1241
1242                                                 title {
1243                                                         data = file:current:title
1244                                                         htmlSpecialChars = 1
1245                                                 }
1246
1247                                                 /*
1248                                                 jumpurl = {$styles.content.uploads.jumpurl}
1249                                                 jumpurl {
1250                                                         secure = {$styles.content.uploads.jumpurl_secure}
1251                                                         secure.mimeTypes = {$styles.content.uploads.jumpurl_secure_mimeTypes}
1252                                                 }
1253                                                 */
1254                                         }
1255                                 }
1256                         }
1257
1258                         # icon
1259                         15 = IMAGE
1260                         15 {
1261                                 file.import = typo3/sysext/frontend/Resources/Public/Icons/FileIcons/
1262                                 file.import.data = file:current:extension
1263                                 file.import.case = lower
1264                                 file.import.wrap = |.gif
1265                                 stdWrap {
1266                                         if {
1267                                                 value = 0
1268                                                 isGreaterThan.field = layout
1269
1270                                                 # only show the icon if we don't have a thumbnail:
1271                                                 isFalse.cObject = IMG_RESOURCE
1272                                                 isFalse.cObject.file < tt_content.uploads.20.renderObj.10.file
1273                                                 isFalse.cObject.stdWrap.if < tt_content.uploads.20.renderObj.10.stdWrap.if
1274                                         }
1275
1276                                         typolink < tt_content.uploads.20.renderObj.10.stdWrap.typolink
1277                                 }
1278                         }
1279
1280                         # filename
1281                         20 = TEXT
1282                         20 {
1283                                 data = file:current:title // file:current:name
1284                                 htmlSpecialChars = 1
1285                                 required = 1
1286
1287                                 replacement {
1288                                         # equivalent to former useSpacesInLinkText = 0; remove using > to disable it
1289                                         10 {
1290                                                 search = _
1291                                                 replace.char = 32
1292                                         }
1293
1294                                         # equivalent to former stripFileExtensionFromLinkText = 0; move "_20" to "20" to enable it. Disabled by default.
1295                                         _20 {
1296                                                 search = /(.*)(\..*)/
1297                                                 replace = \1
1298                                                 useRegExp = 1
1299                                         }
1300                                 }
1301
1302                                 typolink < tt_content.uploads.20.renderObj.10.stdWrap.typolink
1303
1304                                 wrap = <span class="csc-uploads-fileName">|</span>
1305                         }
1306
1307                         # description
1308                         30 = TEXT
1309                         30 {
1310                                 data = file:current:description
1311                                 htmlSpecialChars = 1
1312                                 wrap = <span class="csc-uploads-description">|</span>
1313
1314                                 required = 1
1315                         }
1316
1317                         # file size
1318                         40 = TEXT
1319                         40 {
1320                                 if.isTrue.field = filelink_size
1321                                 data = file:current:size
1322                                 wrap = <span class="csc-uploads-fileSize">|</span>
1323                                 bytes = 1
1324                                 bytes.labels = {$styles.content.uploads.filesizeBytesLabels}
1325                         }
1326
1327                         # wrap of each listed file with odd/even class
1328                         wrap.cObject = COA
1329                         wrap.cObject {
1330                                 10 = LOAD_REGISTER
1331                                 10 {
1332                                         oddEvenClass = li-odd li-first |*| li-even || li-odd
1333                                         elementClass = csc-uploads-element csc-uploads-element-{file:current:extension}
1334                                         elementClass.insertData = 1
1335                                 }
1336
1337                                 20 = TEXT
1338                                 20 {
1339                                         value = <li class="{register:oddEvenClass} {register:elementClass}">|</li>
1340                                         insertData = 1
1341                                 }
1342                                 30 = RESTORE_REGISTER
1343                         }
1344                 }
1345
1346                 # wrap around whole content element with <ul> and editIcons
1347                 stdWrap {
1348                         editIcons = tt_content: media, layout [table_bgColor|table_border|table_cellspacing|table_cellpadding], filelink_size
1349                         editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.filelist
1350                         prefixComment = 2 | Filelist:
1351                         dataWrap = <ul class="csc-uploads csc-uploads-{field:layout}">|</ul>
1352                 }
1353         }
1354 }
1355
1356
1357
1358 # *****************
1359 # CType: table
1360 # *****************
1361 # Rendered by a PHP function specifically written to handle CE tables. See EXT:css_styled_content/Classes/Controller/CssStyledContentController.php
1362 tt_content.table = COA
1363 tt_content.table {
1364         10 = < lib.stdheader
1365
1366         20 = USER
1367         20.userFunc = TYPO3\CMS\CssStyledContent\Controller\CssStyledContentController->render_table
1368         20.field = bodytext
1369
1370         20.color {
1371                 default =
1372                 1 = {$styles.content.table.backgroundColor.1}
1373                 2 = {$styles.content.table.backgroundColor.2}
1374                 200 =
1375                 240 = {$styles.content.table.backgroundColor.240}
1376                 241 = {$styles.content.table.backgroundColor.241}
1377                 242 = {$styles.content.table.backgroundColor.242}
1378                 243 = {$styles.content.table.backgroundColor.243}
1379                 244 = {$styles.content.table.backgroundColor.244}
1380         }
1381         20.tableParams_0 {
1382                 border =
1383                 cellpadding =
1384                 cellspacing =
1385         }
1386         20.tableParams_1 {
1387                 border =
1388                 cellpadding =
1389                 cellspacing =
1390         }
1391         20.tableParams_2 {
1392                 border =
1393                 cellpadding =
1394                 cellspacing =
1395         }
1396         20.tableParams_3 {
1397                 border =
1398                 cellpadding =
1399                 cellspacing =
1400         }
1401         20.innerStdWrap.wrap = |
1402         20.innerStdWrap.htmlSpecialChars = 1
1403         20.innerStdWrap.br = 1
1404
1405         20.stdWrap {
1406                 editIcons = tt_content: cols, bodytext, [layout], [table_bgColor|table_border|table_cellspacing|table_cellpadding]
1407                 editIcons.beforeLastTag = 1
1408                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.table
1409
1410                 prefixComment = 2 | Table:
1411         }
1412 }
1413
1414 # ****************
1415 # CType: menu
1416 # ****************
1417 tt_content.menu = COA
1418 tt_content.menu {
1419         10 = < lib.stdheader
1420
1421         20 = CASE
1422         20 {
1423                 key.field = menu_type
1424
1425                 # "Menu of these pages"
1426                 default = HMENU
1427                 default {
1428                         special = list
1429                         special.value.field = pages
1430                         stdWrap {
1431                                 prepend = COA
1432                                 prepend {
1433                                         stdWrap {
1434                                                 if.isTrue.field = accessibility_bypass
1435                                         }
1436                                         10 = LOAD_REGISTER
1437                                         10 {
1438                                                 accessibility_bypass_text = TEXT
1439                                                 accessibility_bypass_text {
1440                                                         field = accessibility_bypass_text
1441                                                 }
1442                                         }
1443                                         20 = CONTENT
1444                                         20 {
1445                                                 table = tt_content
1446                                                 select {
1447                                                         pidInList = this
1448                                                         orderBy = sorting
1449                                                         where {
1450                                                                 dataWrap = sorting>{field:sorting}
1451                                                         }
1452                                                         languageField = sys_language_uid
1453                                                         max = 1
1454                                                 }
1455                                                 renderObj = TEXT
1456                                                 renderObj {
1457                                                         required = 1
1458                                                         data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:menu.bypassNavigation
1459                                                         override.data = register:accessibility_bypass_text
1460                                                         trim = 1
1461                                                         htmlSpecialChars = 1
1462                                                         typolink {
1463                                                                 parameter {
1464                                                                         field = pid
1465                                                                 }
1466                                                                 section {
1467                                                                         field = uid
1468                                                                 }
1469                                                         }
1470                                                         wrap = <li class="csc-nav-bypass">|</li>
1471                                                 }
1472                                         }
1473                                         30 = RESTORE_REGISTER
1474                                 }
1475                                 outerWrap = <ul class="csc-menu csc-menu-def">|</ul>
1476                                 required = 1
1477                         }
1478                         1 = TMENU
1479                         1 {
1480                                 target < lib.parseTarget
1481                                 target =
1482                                 target.override = {$PAGE_TARGET}
1483                                 NO {
1484                                         stdWrap.htmlSpecialChars = 1
1485                                         wrapItemAndSub = <li>|</li>
1486                                         ATagTitle.field = description // title
1487                                 }
1488                         }
1489                 }
1490
1491                 # "Menu of subpages to these pages"
1492                 1 < .default
1493                 1 {
1494                         special = directory
1495                         stdWrap {
1496                                 outerWrap = <ul class="csc-menu csc-menu-1">|</ul>
1497                         }
1498                 }
1499
1500                 # "Sitemap - liststyle"
1501                 2 = HMENU
1502                 2 {
1503                         stdWrap < tt_content.menu.20.default.stdWrap
1504                         stdWrap {
1505                                 outerWrap = <div class="csc-sitemap">|</div>
1506                         }
1507                         1 = TMENU
1508                         1 {
1509                                 target < lib.parseTarget
1510                                 target =
1511                                 target.override = {$PAGE_TARGET}
1512                                 expAll = 1
1513                                 wrap = <ul>|</ul>
1514                                 NO {
1515                                         stdWrap.htmlSpecialChars = 1
1516                                         wrapItemAndSub = <li>|</li>
1517                                         ATagTitle.field = description // title
1518                                 }
1519                         }
1520                         2 < .1
1521                         3 < .1
1522                         4 < .1
1523                         5 < .1
1524                         6 < .1
1525                         7 < .1
1526                 }
1527
1528                 # "Section index (pagecontent w/Index checked - liststyle)"
1529                 3 < .default
1530                 3 {
1531                         special {
1532                                 value {
1533                                         override {
1534                                                 data = page:uid
1535                                                 if {
1536                                                         isFalse.field = pages
1537                                                 }
1538                                         }
1539                                 }
1540                         }
1541                         stdWrap {
1542                                 outerWrap = <ul class="csc-menu csc-menu-3">|</ul>
1543                         }
1544                         1 = TMENU
1545                         1 {
1546                                 sectionIndex = 1
1547                                 sectionIndex.type = header
1548                                 NO.wrapItemAndSub = <li class="csc-section">|</li>
1549                         }
1550                 }
1551
1552                 # "Menu of subpages to these pages (with abstract)"
1553                 4 < .1
1554                 4 {
1555                         stdWrap {
1556                                 prepend.20.renderObj.wrap = <dt class="csc-nav-bypass">|</dt><dd>&nbsp;</dd>
1557                                 outerWrap = <dl class="csc-menu csc-menu-4">|</dl>
1558                         }
1559                         1.NO {
1560                                 wrapItemAndSub >
1561                                 linkWrap = <dt>|</dt>
1562                                 after {
1563                                         cObject = TEXT
1564                                         cObject {
1565                                                 data = field : abstract // field : description // field : subtitle
1566                                                 htmlSpecialChars = 1
1567                                                 required = 1
1568                                         }
1569                                         ifBlank = &nbsp;
1570                                         wrap = <dd>|</dd>
1571                                 }
1572                                 ATagTitle.field = description // title
1573                         }
1574                 }
1575
1576                 # "Recently updated pages"
1577                 5 < .default
1578                 5 {
1579                         stdWrap {
1580                                 outerWrap = <ul class="csc-menu csc-menu-5">|</ul>
1581                         }
1582                         special = updated
1583                         special {
1584                                 maxAge = 3600*24*7
1585                                 excludeNoSearchPages = 1
1586                         }
1587                 }
1588
1589                 # "Related pages (based on keywords)"
1590                 6 < .default
1591                 6 {
1592                         stdWrap {
1593                                 outerWrap = <ul class="csc-menu csc-menu-6">|</ul>
1594                         }
1595                         special = keywords
1596                         special {
1597                                 excludeNoSearchPages = 1
1598                         }
1599                 }
1600
1601                 # "Menu of subpages to these pages + sections - liststyle"
1602                 7 < .1
1603                 7 {
1604                         stdWrap {
1605                                 outerWrap = <ul class="csc-menu csc-menu-7">|</ul>
1606                         }
1607                         1.expAll = 1
1608                         2 < .1
1609                         2 {
1610                                 sectionIndex = 1
1611                                 sectionIndex.type = header
1612                                 wrap = <ul>|</ul>
1613                                 NO.wrapItemAndSub = <li class="csc-section">|</li>
1614                         }
1615                 }
1616
1617                 # "Sitemaps of selected pages - liststyle"
1618                 8 < .2
1619                 8 {
1620                         special = directory
1621                         special.value.field = pages
1622                 }
1623
1624                 # Menu of categorized pages
1625                 categorized_pages < .default
1626                 categorized_pages {
1627                         special = categories
1628                         special.value.field = selected_categories
1629                         special.relation.field = category_field
1630                         special.sorting = title
1631                         special.order = asc
1632                         stdWrap {
1633                                 outerWrap = <ul class="csc-menu csc-menu-categorized-pages">|</ul>
1634                         }
1635                 }
1636
1637                 # Menu of categorized content elements
1638                 categorized_content = RECORDS
1639                 categorized_content {
1640                         categories.field = selected_categories
1641                         categories.relation.field = category_field
1642                         tables = tt_content
1643                         conf.tt_content = TEXT
1644                         conf.tt_content {
1645                                 field = header
1646                                 typolink.parameter = {field:pid}#{field:uid}
1647                                 typolink.parameter.insertData = 1
1648                                 wrap = <li>|</li>
1649                         }
1650                         wrap = <ul>|</ul>
1651                 }
1652         }
1653
1654         20.stdWrap {
1655                 wrap {
1656                         cObject = COA
1657                         cObject {
1658                                 10 = TEXT
1659                                 10 {
1660                                         field = accessibility_title
1661                                         htmlSpecialChars = 1
1662                                         dataWrap = <map id="map{field:uid}" title="|">
1663                                         dataWrap {
1664                                                 override = <map name="map{field:uid}" title="|">
1665                                                 override {
1666                                                         if {
1667                                                                 isFalse.data = TSFE:xhtmlDoctype
1668                                                         }
1669                                                 }
1670                                         }
1671                                 }
1672
1673                                 20 = TEXT
1674                                 20 {
1675                                         value = |</map>
1676                                 }
1677                         }
1678                         if {
1679                                 isTrue {
1680                                         field = accessibility_title
1681                                 }
1682                         }
1683                 }
1684                 editIcons = tt_content: menu_type, pages
1685                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.menuSitemap
1686
1687                 prefixComment = 2 | Menu/Sitemap element:
1688         }
1689 }
1690
1691
1692
1693 # ****************
1694 # CType: shortcut
1695 # ****************
1696 # Should be a complete copy from the old static template "content (default)"
1697 tt_content.shortcut = COA
1698 tt_content.shortcut {
1699
1700         20 = RECORDS
1701         20 {
1702                 source.field = records
1703                 tables = {$content.shortcut.tables}
1704         }
1705
1706         20.stdWrap {
1707                 editIcons = tt_content: records
1708                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.recordList
1709
1710                 prefixComment = 2 | Inclusion of other records (by reference):
1711         }
1712 }
1713
1714
1715 # ****************
1716 # CType: list
1717 # ****************
1718 # Should be a complete copy from the old static template "content (default)" (except "lib.stdheader")
1719 tt_content.list = COA
1720 tt_content.list {
1721         10 = < lib.stdheader
1722
1723         20 = CASE
1724         20.key.field = list_type
1725
1726         20.stdWrap {
1727                 editIcons = tt_content: list_type, layout, select_key, pages [recursive]
1728                 editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.plugin
1729
1730                 prefixComment = 2 | Plugin inserted:
1731         }
1732 }
1733
1734
1735 # ****************
1736 # CType: div
1737 # ****************
1738 tt_content.div = TEXT
1739 tt_content.div {
1740         value = <hr>
1741         override = <hr />
1742         override.if {
1743                 isTrue.data = TSFE:xhtmlDoctype
1744         }
1745         wrap = <div class="divider">|</div>
1746         prefixComment = 2 | Div element
1747 }
1748
1749
1750 # ****************
1751 # CType: html
1752 # ****************
1753 # This truely IS a content object, launched from inside the PHP class of course.
1754 # Should be a complete copy from the old static template "content (default)"
1755 tt_content.html = TEXT
1756 tt_content.html {
1757         field = bodytext
1758
1759         editIcons = tt_content:bodytext
1760         editIcons.beforeLastTag = 1
1761         editIcons.iconTitle.data = LLL:EXT:css_styled_content/Resources/Private/Language/locallang.xlf:eIcon.html
1762
1763         prefixComment = 2 | Raw HTML content:
1764 }
1765
1766
1767 # ****************
1768 # Default error msg:
1769 # ****************
1770 tt_content.default = TEXT
1771 tt_content.default {
1772         field = CType
1773         wrap = <p style="background-color: yellow;"><b>ERROR:</b> Content Element type "|" has no rendering definition!</p>
1774         htmlSpecialChars = 1
1775
1776         prefixComment = 2 | Unknown element message:
1777 }
1778
1779 # *********************************************************************
1780 # ACCESSIBILTY MODE
1781 # *********************************************************************
1782
1783
1784
1785
1786
1787
1788
1789 plugin.tx_cssstyledcontent._CSS_DEFAULT_STYLE (
1790         /* Headers */
1791         .csc-header-alignment-center { text-align: center; }
1792         .csc-header-alignment-right { text-align: right; }
1793         .csc-header-alignment-left { text-align: left; }
1794
1795         div.csc-textpic-responsive, div.csc-textpic-responsive * { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;  }
1796
1797         /* Clear floats after csc-textpic and after csc-textpic-imagerow */
1798         div.csc-textpic, div.csc-textpic div.csc-textpic-imagerow, ul.csc-uploads li { overflow: hidden; }
1799
1800         /* Set padding for tables */
1801         div.csc-textpic .csc-textpic-imagewrap table { border-collapse: collapse; border-spacing: 0; }
1802         div.csc-textpic .csc-textpic-imagewrap table tr td { padding: 0; vertical-align: top; }
1803
1804         /* Settings for figure and figcaption (HTML5) */
1805         div.csc-textpic .csc-textpic-imagewrap figure, div.csc-textpic figure.csc-textpic-imagewrap { margin: 0; display: table; }
1806
1807         /* Captions */
1808         figcaption.csc-textpic-caption { display: table-caption; }
1809         .csc-textpic-caption { text-align: left; caption-side: bottom; }
1810         div.csc-textpic-caption-c .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-c { text-align: center; }
1811         div.csc-textpic-caption-r .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-r { text-align: right; }
1812         div.csc-textpic-caption-l .csc-textpic-caption, .csc-textpic-imagewrap .csc-textpic-caption-l { text-align: left; }
1813
1814         /* Float the columns */
1815         div.csc-textpic div.csc-textpic-imagecolumn { float: left; }
1816
1817         /* Border just around the image */
1818         {$styles.content.imgtext.borderSelector} {
1819                 border: {$styles.content.imgtext.borderThick}px solid {$styles.content.imgtext.borderColor};
1820                 padding: {$styles.content.imgtext.borderSpace}px {$styles.content.imgtext.borderSpace}px;
1821         }
1822
1823         div.csc-textpic .csc-textpic-imagewrap img { border: none; display: block; }
1824
1825         /* Space below each image (also in-between rows) */
1826         div.csc-textpic .csc-textpic-imagewrap .csc-textpic-image { margin-bottom: {$styles.content.imgtext.rowSpace}px; }
1827         div.csc-textpic .csc-textpic-imagewrap .csc-textpic-imagerow-last .csc-textpic-image { margin-bottom: 0; }
1828
1829         /* colSpace around image columns, except for last column */
1830         div.csc-textpic-imagecolumn, td.csc-textpic-imagecolumn .csc-textpic-image { margin-right: {$styles.content.imgtext.colSpace}px; }
1831         div.csc-textpic-imagecolumn.csc-textpic-lastcol, td.csc-textpic-imagecolumn.csc-textpic-lastcol .csc-textpic-image { margin-right: 0; }
1832
1833         /* Add margin from image-block to text (in case of "Text & Images") */
1834         div.csc-textpic-intext-left .csc-textpic-imagewrap,
1835         div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap {
1836                 margin-right: {$styles.content.imgtext.textMargin}px;
1837         }
1838         div.csc-textpic-intext-right .csc-textpic-imagewrap,
1839         div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap {
1840                 margin-left: {$styles.content.imgtext.textMargin}px;
1841         }
1842
1843         /* Positioning of images: */
1844
1845         /* Center (above or below) */
1846         div.csc-textpic-center .csc-textpic-imagewrap, div.csc-textpic-center figure.csc-textpic-imagewrap { overflow: hidden; }
1847         div.csc-textpic-center .csc-textpic-center-outer { position: relative; float: right; right: 50%; }
1848         div.csc-textpic-center .csc-textpic-center-inner { position: relative; float: right; right: -50%; }
1849
1850         /* Right (above or below) */
1851         div.csc-textpic-right .csc-textpic-imagewrap { float: right; }
1852         div.csc-textpic-right div.csc-textpic-text { clear: right; }
1853
1854         /* Left (above or below) */
1855         div.csc-textpic-left .csc-textpic-imagewrap { float: left; }
1856         div.csc-textpic-left div.csc-textpic-text { clear: left; }
1857
1858         /* Left (in text) */
1859         div.csc-textpic-intext-left .csc-textpic-imagewrap { float: left; }
1860
1861         /* Right (in text) */
1862         div.csc-textpic-intext-right .csc-textpic-imagewrap { float: right; }
1863
1864         /* Right (in text, no wrap around) */
1865         div.csc-textpic-intext-right-nowrap .csc-textpic-imagewrap { float: right; }
1866
1867         /* Left (in text, no wrap around) */
1868         div.csc-textpic-intext-left-nowrap .csc-textpic-imagewrap { float: left; }
1869
1870         div.csc-textpic div.csc-textpic-imagerow-last, div.csc-textpic div.csc-textpic-imagerow-none div.csc-textpic-last { margin-bottom: 0; }
1871
1872         /* Browser fixes: */
1873
1874         /* Fix for unordered and ordered list with image "In text, left" */
1875         .csc-textpic-intext-left ol, .csc-textpic-intext-left ul { padding-left: 40px; overflow: auto; }
1876
1877         /* File Links */
1878         ul.csc-uploads { padding: 0; }
1879         ul.csc-uploads li { list-style: none outside none; margin: 1em 0; }
1880         ul.csc-uploads img { float: left; margin-right: 1em; vertical-align: top; }
1881         ul.csc-uploads span { display: block; }
1882         ul.csc-uploads span.csc-uploads-fileName { text-decoration: underline; }
1883
1884         /* Table background colors: */
1885
1886         table.contenttable-color-1 { background-color: {$styles.content.table.backgroundColor.1}; }
1887         table.contenttable-color-2 { background-color: {$styles.content.table.backgroundColor.2}; }
1888         table.contenttable-color-240 { background-color: {$styles.content.table.backgroundColor.240}; }
1889         table.contenttable-color-241 { background-color: {$styles.content.table.backgroundColor.241}; }
1890         table.contenttable-color-242 { background-color: {$styles.content.table.backgroundColor.242}; }
1891         table.contenttable-color-243 { background-color: {$styles.content.table.backgroundColor.243}; }
1892         table.contenttable-color-244 { background-color: {$styles.content.table.backgroundColor.244}; }
1893 )