更新时间:2023-11-30 10:14:22
我不知道(几乎)每个页面都有另一个模板是否很有用,但总的来说是可能的.只需考虑在根行中始终使用在当前级别定义的模板,或者(如果不存在)使用在根行上找到的模板(如果不存在).
I don't know if it's very useful to have for (nearly) every page another template but in general that's possible. Just consider that in the root-line always that template is used that is defined on the current level or - if not existing - that, that is found first while going up the root-line.
对于每个其他模板,您都必须从上方在此代码段内添加一个部分:
For every additional template you've to add a section inside this snippet from above:
templateName.stdWrap.cObject {
key.data = pagelayout
pagets__default = TEXT
pagets__default.value = Default
default = TEXT
default.value = Default
}
因此,包括选项about us
的代码段可能看起来像这样:
So including the option about us
the snippet could look like this:
templateName.stdWrap.cObject {
key.data = pagelayout
pagets__default = TEXT
pagets__default.value = Default
default = TEXT
default.value = Default
pagets__aboutus = TEXT
pagets__aboutus.value = AboutUs
aboutus = TEXT
aboutus.value = AboutUs
}
此外,您仍然必须更改TCA,以将其包含在下拉按钮中.
Additional you still have to change the TCA probably to include the options in the drop-down-button.