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