📄 setup.txt
字号:
# ***************************************************************************# Notice: "styles." (and "temp.") objects are UNSET after template parsing!# Use "lib." for persisting storage of objects.# ***************************************************************************# Clear out any constants in this reserved room!styles.content ># get contentstyles.content.get = CONTENTstyles.content.get { table = tt_content select.orderBy = sorting select.where = colPos=0 select.languageField = sys_language_uid}# get content, leftstyles.content.getLeft < styles.content.getstyles.content.getLeft.select.where = colPos=1# get content, rightstyles.content.getRight < styles.content.getstyles.content.getRight.select.where = colPos=2# get content, marginstyles.content.getBorder < styles.content.getstyles.content.getBorder.select.where = colPos=3# get newsstyles.content.getNews < styles.content.getstyles.content.getNews.select.pidInList = {$styles.content.getNews.newsPid}# Edit page object:styles.content.editPanelPage = COAstyles.content.editPanelPage { 10 = EDITPANEL 10 { allow = toolbar,move,hide label.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.page label.wrap = | <b>%s</b> }}# *********************************************************************# "lib." objects are preserved from unsetting after template parsing# *********************************************************************# Creates persistent ParseFunc setup for non-HTML content. This is recommended to use (as a reference!)lib.parseFunc { makelinks = 1 makelinks.http.keep = {$styles.content.links.keep} makelinks.http.extTarget = {$styles.content.links.extTarget} makelinks.mailto.keep = path tags { link = TEXT link { current = 1 typolink.parameter.data = parameters : allParams typolink.extTarget = {$styles.content.links.extTarget} typolink.target = {$styles.content.links.target} parseFunc.constants =1 } } allowTags = {$styles.content.links.allowTags} denyTags = * sword = <span class="csc-sword">|</span> constants = 1 nonTypoTagStdWrap.HTMLparser = 1 nonTypoTagStdWrap.HTMLparser { keepNonMatchedTags = 1 htmlSpecialChars = 2 }}# good old parsefunc in "styles.content.parseFunc" is created for backwards compatibility. Don't use it, just ignore.styles.content.parseFunc < lib.parseFunc# Creates persistent ParseFunc setup for RTE content (which is mainly HTML) based on the "ts_css" transformation.lib.parseFunc_RTE < lib.parseFunclib.parseFunc_RTE { // makelinks > # Processing <table> and <blockquote> blocks separately externalBlocks = table, blockquote, ol,ul externalBlocks { # The blockquote content is passed into parseFunc again... blockquote.stripNL=1 blockquote.callRecursive=1 blockquote.callRecursive.tagStdWrap.HTMLparser = 1 blockquote.callRecursive.tagStdWrap.HTMLparser.tags.blockquote.overrideAttribs = style="margin-bottom:0;margin-top:0;" ol.stripNL=1 ol.stdWrap.parseFunc = < lib.parseFunc ul.stripNL=1 ul.stdWrap.parseFunc = < lib.parseFunc table.stripNL=1 table.stdWrap.HTMLparser = 1 table.stdWrap.HTMLparser.tags.table.fixAttrib.class { default = contenttable always = 1 list = contenttable } table.stdWrap.HTMLparser.keepNonMatchedTags = 1 table.HTMLtableCells=1 table.HTMLtableCells { default.callRecursive=1 addChr10BetweenParagraphs=1 } } nonTypoTagStdWrap.encapsLines { encapsTagList = div,p,pre,h1,h2,h3,h4,h5,h6 remapTag.DIV = P nonWrappedTag = P innerStdWrap_all.ifBlank = addAttributes.P.class = bodytext addAttributes.P.class.setOnly=blank } nonTypoTagStdWrap.HTMLparser = 1 nonTypoTagStdWrap.HTMLparser { keepNonMatchedTags = 1 htmlSpecialChars = 2 }}# Content header:lib.stdheader = COAlib.stdheader { # Create align style-attribute for <Hx> tags 2 = LOAD_REGISTER 2.headerStyle.field = header_position 2.headerStyle.required = 1 2.headerStyle.noTrimWrap = | style="text-align:|;"| # Create class="csc-firstHeader" attribute for <Hx> tags 3 = LOAD_REGISTER 3.headerClass = csc-firstHeader 3.headerClass.if.value=1 3.headerClass.if.equals.data = cObj:parentRecordNumber 3.headerClass.noTrimWrap = | class="|"| # Date format: 5 = TEXT 5.field = date 5.if.isTrue.field = date 5.date = d/m Y 5.wrap = <p class="csc-header-date">|</p> 5.prefixComment = 2 | Header date: # This CASE cObject renders the header content: # currentValue is set to the header data, possibly wrapped in link-tags. 10 = CASE 10.setCurrent { field = header htmlSpecialChars = 1 typolink.parameter.field = header_link } 10.key.field = header_layout 10.key.ifEmpty = {$content.defaultHeaderType} 10.key.ifEmpty.override.data = register: defaultHeaderType 10.1 = TEXT 10.1.current = 1 10.1.insertData = 1 10.1.fontTag = <h1{register:headerStyle}{register:headerClass}>|</h1> 10.2 < .10.1 10.2.fontTag = <h2{register:headerStyle}{register:headerClass}>|</h2> 10.3 < .10.1 10.3.fontTag = <h3{register:headerStyle}{register:headerClass}>|</h3> 10.4 < .10.1 10.4.fontTag = <h4{register:headerStyle}{register:headerClass}>|</h4> 10.5 < .10.1 10.5.fontTag = <h5{register:headerStyle}{register:headerClass}>|</h5> # Pops the used registers off the stack: 98 = RESTORE_REGISTER 99 = RESTORE_REGISTER # Post-processing: stdWrap.fieldRequired = header stdWrap.if { equals.field = header_layout value = 100 negate = 1 } stdWrap.editIcons = tt_content : header, [header_layout | header_position], [header_link|date] stdWrap.editIcons.beforeLastTag = 1 stdWrap.editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.header stdWrap.dataWrap = <div class="csc-header csc-header-n{cObj:parentRecordNumber}">|</div> stdWrap.prefixComment = 2 | Header:}#******************************************************# Including library for processing of some elements:#******************************************************includeLibs.tx_cssstyledcontent_pi1 = EXT:css_styled_content/pi1/class.tx_cssstyledcontent_pi1.php#**********************************# tt_content is started#**********************************tt_content >tt_content = CASEtt_content.key.field = CTypett_content.stdWrap { spaceBefore.field = spaceBefore spaceAfter.field = spaceAfter space = {$content.space} innerWrap.cObject = CASE innerWrap.cObject { key.field = section_frame 1 = TEXT 1.value = <div class="csc-frame csc-frame-invisible">|</div> 5 = TEXT 5.value = <div class="csc-frame csc-frame-rulerBefore"></div>| 6 = TEXT 6.value = |<div class="csc-frame csc-frame-rulerAfter"></div> 10 = TEXT 10.value = <div class="csc-frame csc-frame-indent">|</div> 11 = TEXT 11.value = <div class="csc-frame csc-frame-indent3366">|</div> 12 = TEXT 12.value = <div class="csc-frame csc-frame-indent6633">|</div> 20 = TEXT 20.value = <div class="csc-frame csc-frame-frame1">|</div> 21 = TEXT 21.value = <div class="csc-frame csc-frame-frame2">|</div> } innerWrap2 = | <p class="csc-linkToTop"><a href="#">{LLL:EXT:css_styled_content/pi1/locallang.php:label.toTop}</a></p> innerWrap2.insertData = 1 innerWrap2.fieldRequired = linkToTop dataWrap = <a id="c{field:uid}"></a> | prepend = TEXT prepend.dataWrap = <a id="c{field:_LOCALIZED_UID}"></a> prepend.if.isTrue.field = _LOCALIZED_UID editPanel = 1 editPanel { allow = move,new,edit,hide,delete line = 5 label = %s onlyCurrentPid = 1 previewBorder = 4 edit.displayRecord = 1 } prefixComment = 1 | CONTENT ELEMENT, uid:{field:uid}/{field:CType}}# *****************# CType: header# *****************# See Object path "lib.stdheader"tt_content.header = COAtt_content.header { 10 = < lib.stdheader 20 = TEXT 20 { field = subheader required = 1 dataWrap = <p class="csc-subheader csc-subheader-{field:layout}">|</p> htmlSpecialChars = 1 editIcons = tt_content:subheader,layout editIcons.beforeLastTag = 1 editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.subheader prefixComment = 2 | Subheader: }}# *****************# CType: text# *****************tt_content.text = COAtt_content.text { 10 = < lib.stdheader 20 = TEXT 20 { field = bodytext required = 1 parseFunc = < lib.parseFunc_RTE editIcons = tt_content:bodytext, rte_enabled editIcons.beforeLastTag = 1 editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.bodytext prefixComment = 2 | Text: }}# *****************# CType: image# *****************# (also used for rendering 'textpic' type):tt_content.image = COAtt_content.image.10 = < lib.stdheadertt_content.image.20 = IMGTEXTtt_content.image.20 { imgList.field = image textPos.field = imageorient imgPath = uploads/pics/ imgObjNum = 1 1 { file.import.current = 1 file.width.field = imagewidth params = align="top" imageLinkWrap = 1 imageLinkWrap { bodyTag = <body bgcolor="black"> wrap = <a href="javascript:close();"> | </a> width = {$styles.content.imgtext.linkWrap.width} height = {$styles.content.imgtext.linkWrap.height} effects = {$styles.content.imgtext.linkWrap.effects} JSwindow = 1 JSwindow.newWindow = {$styles.content.imgtext.linkWrap.newWindow} JSwindow.expand = 17,20 enable.field = image_zoom enable.ifEmpty.typolink.parameter.field = image_link enable.ifEmpty.typolink.parameter.listNum.stdWrap.data = register : IMAGE_NUM_CURRENT enable.ifEmpty.typolink.returnLast = url typolink.parameter.field = image_link typolink.parameter.listNum.stdWrap.data = register : IMAGE_NUM_CURRENT typolink.target = {$styles.content.links.target} typolink.extTarget = {$styles.content.links.extTarget} } altText = TEXT altText { field = altText stripHtml = 1 split.token.char = 10 split.token.if.isTrue = {$styles.content.imgtext.imageTextSplit} split.returnKey.data = register : IMAGE_NUM_CURRENT } titleText < .altText titleText.field = titleText longdescURL < .altText longdescURL.field = longdescURL emptyTitleHandling = {$styles.content.imgtext.emptyTitleHandling} titleInLink = {$styles.content.imgtext.titleInLink} titleInLinkAndImg = {$styles.content.imgtext.titleInLinkAndImg} } maxW = {$styles.content.imgtext.maxW} maxW.override.data = register:maxImageWidth maxWInText = {$styles.content.imgtext.maxWInText} maxWInText.override.data = register:maxImageWidthInText equalH.field = imageheight spaceBelowAbove = 6 image_compression.field = image_compression image_effects.field = image_effects noRows.field = image_noRows cols.field = imagecols border.field = imageborder caption { 1 = TEXT 1 { field = imagecaption required = 1 parseFunc =< lib.parseFunc br = 1 fontTag = <p class="csc-caption">|</p> wrapAlign.field = imagecaption_position split.token.char = 10 split.token.if.isPositive = {$styles.content.imgtext.imageTextSplit} + {$styles.content.imgtext.captionSplit} split.returnKey.data = register : IMAGE_NUM_CURRENT } } # captionSplit is deprecated, use imageTextSplit instead captionSplit = {$styles.content.imgtext.captionSplit} # caption/alttext/title/longdescURL splitting imageTextSplit = {$styles.content.imgtext.imageTextSplit} borderCol = {$styles.content.imgtext.borderColor} borderThick = {$styles.content.imgtext.borderThick} colSpace = {$styles.content.imgtext.colSpace} rowSpace = {$styles.content.imgtext.rowSpace} textMargin = {$styles.content.imgtext.textMargin} editIcons = tt_content : image [imageorient|imagewidth|imageheight], [imagecols|image_noRows|imageborder],[image_link|image_zoom],[image_compression|image_effects|image_frames],imagecaption[imagecaption_position] editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.images caption.editIcons = tt_content : imagecaption[imagecaption_position] caption.editIcons.beforeLastTag=1 caption.editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.caption stdWrap.prefixComment = 2 | Image block:}# *****************# CType: textpic# *****************tt_content.textpic = COAtt_content.textpic { 10 = COA 10.if.value = 25 10.if.isLessThan.field = imageorient 10.10 = < lib.stdheader 20 = < tt_content.image.20 20.text.10 = COA 20.text.10 { if.value = 24 if.isGreaterThan.field = imageorient 10 = < lib.stdheader 10.stdWrap.dataWrap = <div class="csc-textpicHeader csc-textpicHeader-{field:imageorient}">|</div> } 20.text.20 = < tt_content.text.20}# *****************# CType: bullet# *****************# Rendered by a PHP function specifically written to handle CE bullet lists. See css_styled_content/pi1/class.tx_cssstyledcontent_pi1.phptt_content.bullets = COAtt_content.bullets { 10 = < lib.stdheader 20 = USER 20.userFunc = tx_cssstyledcontent_pi1->render_bullets 20.innerStdWrap.parseFunc = < lib.parseFunc 20.stdWrap { editIcons = tt_content: bodytext, [layout] editIcons.beforeLastTag = 1 editIcons.iconTitle.data = LLL:EXT:css_styled_content/pi1/locallang.php:eIcon.bullets prefixComment = 2 | Bullet list: }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -