1

我正在尝试在基于Typo3 Fluid的模板的主布局中添加“用户控制”页脚。
这意味着我在一个称为“页脚页面”的特殊后端页面中添加了一个包含四列的后端布局。用户可以使用WEB > PAGE模块在这些列中添加内容元素。
每当用户在其中一列中添加内容元素(文本、带图像的文本、项目符号列表等)时,一切正常并且内容正确显示。但是当用户尝试添加一个特殊的菜单内容元素时,菜单不会显示并且列容器保持为空。

主要布局

<body>
    ...
    <div id="footer">
        <f:cObject typoscriptObjectPath="lib.footer" />
    </div>
</body>

主页面排版

page = PAGE
page {
    # Regular pages always have typeNum = 0
    typeNum = 0
    10 = FLUIDTEMPLATE
    10 {
        #file = {$filepaths.templates}index_f.html
        partialRootPath = {$filepaths.templates}partials/
        layoutRootPath = {$filepaths.templates}layouts/
        variables {
            ...
            footer < lib.footer
            ...
        }
     }
}

lib.footer 排版

lib.footer = COA
lib.footer {
    10 = CONTENT
    10 {
        table = tt_content
        select.pidInList = {$contentpage.footerPID}
        select.where = colPos = 901
        select.orderBy = sorting
        stdWrap.wrap = <div id="footer-widget-1" class="col205">|</div>
    }
    20 = CONTENT
    20 {
        table = tt_content
        select.pidInList = {$contentpage.footerPID}
        select.where = colPos = 902
        select.orderBy = sorting
        stdWrap.wrap = <div id="footer-widget-2" class="col205">|</div>
    }
    ...
}

我做错了什么还是一个错误?Typo3 版本为 6.0.4

4

1 回答 1

1

您可能想看看 TYPO3 的 VHS 扩展 - 它特别包含一个 ViewHelper,它可以让您从任何页面上的任何列(通过 UID)呈现内容元素。它甚至可以从内容元素 UID 列表中呈现内容元素(您可以在 TypoScript 中指定,在 FlexForm 中选择,在常量编辑器中进行编辑等):

http://fedext.net/viewhelpers/vhs/Content/RenderViewHelper.html

很多时候,来自 VHS 的 ViewHelpers 会让您做与 TS 让您做的完全相同的事情,但直接在 Fluid 中这样做,并且可以选择手动控制输出的 HTML。

干杯,
克劳斯。无名编码者

于 2013-09-06T23:20:57.767 回答