【问题标题】:How to include a constant in a TYPO3 Fluid VHS menu如何在 TYPO3 Fluid VHS 菜单中包含常量
【发布时间】:2015-03-23 10:15:01
【问题描述】:

我有一个由 Fluid Menu ViewHelper 生成的简单菜单:

<v:page.menu useShortcutData="TRUE" levels="3" expandAll="1" class="menu" classActive="act" substElementUid="1" excludePages="12,13,3" />

有多种语言,每种语言在导航中隐藏了不同的页面,我想在“excludePages”部分进行更改。

在 Typoscript 中,我会简单地使用像 {$exclude} 这样的常量标记。在流体中添加标记会破坏菜单。在这样的内联流体设置中实现这一目标的方法是什么?

【问题讨论】:

  • 取决于您如何使用流体(使用 FLUIDTEMPLATE、fluidpages,...)。您始终可以将变量发送到流体。告诉我们您使用什么(以及如何),我们可以为您提供更多帮助
  • 您对语言或 OneTree 使用不同的站点树?

标签: typo3 fluid


【解决方案1】:

有多种方法可以让 Fluid 保持不变。

1。包含表单 TypoScript

{f:cObject(typoscriptObjectPath: 'lib.myConstant')}

2。保存在您分机的设置中。

plugin.tx_myext.settings {
  myonstant = TEXT
  myconstant = 1,2,3
}

3。页面模板中的配置(纯流体方式)

<f:section name="Configuration">
    <flux:form id="mypage" options="{icon: 'Icons/Page/Standard.gif'}">
        <flux:field.tree name="myConstantFromTRee" table="pages" parentField="pid" expandAll="0" multiple="1" minItems="0" maxItems="0" label="myConstantFromList" foreignLabel="title" size="10"/> 
    </flux:form>
    <flux:grid>
        <flux:grid.row>
            <flux:grid.column colPos="0"  name="main" />
        </flux:grid.row>
    </flux:grid>
</f:section>

然后使用{settings.myConstantFromTRee} 访问它。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2018-03-23
    • 2019-06-03
    • 1970-01-01
    • 2020-06-13
    • 2014-05-31
    • 1970-01-01
    • 2013-07-18
    相关资源
    最近更新 更多