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