0

我在 TSconfig 中设置了自己的 tt_content 布局,例如

TCEFORM.tt_content.layout.removeItems = 1,2,3
TCEFORM.tt_content.layout.addItems.100 = Green Box

并将类定义添加到我的排版设置中,例如

# Layout Green Box (100)
tt_content.stdWrap.innerWrap.cObject{
    100=<tt_content.stdWrap.innerWrap.cObject.default
    100.15.value = greenbox
}

在 TYPO3 CMS 7.6.9 中。但是前端什么也没有发生。布局“绿框”出现在外观 > 布局下拉菜单中,但该类没有。

自 7+ 版本的流畅布局以来,我是不是有什么问题或者有新的方法?

4

2 回答 2

0

有点晚了,但有人可能仍然觉得这很有用。

如果您使用的是 css_styled_content,那么是的,它在新版本中略有变化。基本上结构现在看起来像这样:

stdWrap.innerWrap.cObject.[default|NN] {
    # 10 - OPEN TAG
    10.cObject.default.value = <div id="c{field:uid}"
    # 20 - CLASS
    20.10.value = csc-default
    # 30 - CLOSE TAG
    30.cObject.default.value = >|</div>
}

版本之间的差异:

# overwrite basic settings for selected frame:
stdWrap.innerWrap.cObject.[NN (layout number or default)]

# for open tag:  instead of NN.10.value  (default.10.value)   use:  NN.10.cObject.default.value   (default.10.cObject.default.value)
# for class:     instead of NN.15.value  (default.15.value)   use:  NN.20.10.value  (default.20.10.value)
# for close tag: instead of NN.30.value  (default.30.value)   use:  NN.30.cObject.default.value   (default.30.cObject.default.value)

所以在被问到的情况下,它将是这样的:

# Layout Green Box (100)
tt_content.stdWrap.innerWrap.cObject{
    100 =< tt_content.stdWrap.innerWrap.cObject.default
    100.20.10.value = greenbox
}
于 2017-05-14T23:30:10.730 回答
0

事实上,它需要在您自己的流体模板中定义。因此,您要做的是将fluid_styled_content的私有文件夹复制到您自己的发行版私有文件夹中,并在您的打字稿常量中添加一些行,例如

styles.templates {
  templateRootPath = {$resDir}/Private/Tt_content/Templates
  partialRootPath = {$resDir}/Private/Tt_content/Partials
  layoutRootPath = {$resDir}/Private/Tt_content/Layouts
}

就我而言,我将Textmedia.html的第二行编辑为

<div id="c{data.uid}" {f:if(condition: '{data.layout} == 100', then: 'class="greenbox"')}>

等等,它工作正常。

于 2016-06-21T13:13:32.053 回答