【发布时间】:2017-02-11 10:08:40
【问题描述】:
我有一个单页布局的流畅的typo3网站。一个菜单有不同的布局。如何在我的主模板中获取选定的布局名称?
main.html
<v:page.menu levels="1" as="sections">
<f:for each="{sections}" as="section" iteration="itemIteration">
<f:debug>{sections}</f:debug>
</f:for>
</v:page.menu>
sub.html
<f:layout name="Pagewithnav" />
<f:section name="Configuration">
<flux:form id="subnav" icon="{f:uri.resource(path: 'Icons/Page/logo.png')}" label="Sub Navigation">
<!-- Insert fields, sheets, grid, form section objects etc. here, in this flux:form tag -->
</flux:form>
<flux:grid>
<!-- Edit this grid to change the "backend layout" structure -->
<flux:grid.row>
<flux:grid.column colPos="0" colspan="4" name="main" label="Navigation wrapper" />
</flux:grid.row>
<flux:grid.row>
<flux:grid.column colPos="1" colspan="4" name="main" label="Main wrapper" />
</flux:grid.row>
</flux:grid>
</f:section>
<f:section name="Main">
<div class="sub_nav">
<div class="container">
<v:content.render column="0"/>
</div>
</div>
<div class="container">
<v:content.render column="1"/>
</div>
</f:section>
【问题讨论】:
-
如果你想要一个页面的后端布局,一般情况下你可以从 $GLOBALS['TSFE'] 数组中获取。但这里是关于通量的,对吧??但是在模板提供程序扩展中是否需要知道选择的后端布局。?请更准确地解释您的要求。
-
@AnuBhuvanendranNair 我需要流体通量模板中的模板名称。由于我使用提供程序扩展,我不能使用 $GLOBALS['TSFE'] 数组
标签: typo3 flux fluid-layout extbase