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