使用TYPO3中的数据处理器8

用户__42

我尝试使用TYPO3 8中的数据处理器制作菜单。

我的TypoScript脚本中包含以下代码:

page = PAGE
page{
  10 = FLUIDTEMPLATE
  10 {
      file = fileadmin/abis/templates/BootstrapTmpl.html
      partialRootPath = fileadmin/abis/Partials/
      layoutRootPath =  fileadmin/abis/Layouts/
  }
  dataProcessing {
    10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
    10 {
      entryLevel= 0
      excludeUidList = 27,30,31
      levels = 5
      #includeSpacer = 1
      titleField = nav_title // title
      as = huhu
    }
  }
  ...
}

这是一节中的内容:

<f:section name="myMenu" >
    <f:debug title="title">{huhu}</f:debug>
    <f:cObject typoscriptObjectPath="obj.logo" />
    <ul class="nav navbar-nav navbar-left">
        <f:for each="{huhu}" as="menuItem">
             <li>
                {menuItem.text}
                <f:if condition="menuItem.subItems">
                    <f:render section="myMenu" arguments="{myMenu: menuItem.subItems}" />
                </f:if>
            </li>
        </f:for>
    </ul>
</f:section>

我的HTML输出为空。变量{huhu}为空。而且我不知道为什么。有人有主意吗?

托马斯·洛夫勒

尝试将dataProcessing放入page.10

page = PAGE
page {
    10 = FLUIDTEMPLATE
    10 {
        file = fileadmin/abis/templates/BootstrapTmpl.html
        partialRootPath = fileadmin/abis/Partials/
        layoutRootPath =  fileadmin/abis/Layouts/

        dataProcessing {
            10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
            10 {
                entryLevel= 0
                excludeUidList = 27,30,31
                levels = 5
                #includeSpacer = 1
                titleField = nav_title // title
                as = huhu
            }
        }
    }
}

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章