我已经设置了一个站点来使用 Flux / FLUIDCONTENT 作为模板,并使用此处的教程使其工作:http://thomas.deuling.org/2011/06/create-base-html-fluid-templates-for-typo3-4-5/
一切都运行良好,但现在我希望能够为每页选择一个图像并使用它来构建一个大标题。使用 templavoila,我可以创建页面属性中可用的字段,但似乎无法使其与 FLUIDCONTENT 一起使用。
我正在使用 Typo3 6.1,这是我的内页 Flex 模板:
{namespace v=Tx_Vhs_ViewHelpers}
{namespace flux=Tx_Flux_ViewHelpers}
<f:layout name="main" />
<f:section name="content">
<f:format.raw>{content_header}</f:format.raw>
<div id="content">
<div class="container">
<div class="row">
<div class="col-md-3">
<f:format.raw>{content_left}</f:format.raw>
</div>
<div class="col-md-9">
<f:format.raw>{content}</f:format.raw>
</div>
</div>
</div>
</div>
</f:section>
如何将表单字段添加到页面属性并在我的模板中使用它们?
恐怕你把事情搞混了一点。
flux
, fluidcontent
和(对你来说特别重要)fluidpages
一起玩到extend默认的创建能力fluid
TYPO3 的模板。
-
flux是解析和重构 TYPO3 表单字段的基础技术。
-
液体含量利用助焊剂来允许灵活的内容元素
-
流动页面利用通量允许在具有自定义字段的纯流体中进行页面布局
总结一下:您已经阅读了有关基本知识的教程fluid
页面模板,但不是fluidpages
模板化。为了帮助您快速入门,提供了一些示例和文档资源:
- The 快速开始从文档存储库
- The 专业提供者扩展来自引导程序包(请谨慎使用 - 这是一个example,不是您的下一个项目模板)
- 扩展
fluidcontent_bootstrap
and fluidpages_bootstrap
当您浏览完这些资源后,您就知道如何注册提供程序扩展,以便您可以在后端的页面属性中选择它。
您的模板可能看起来像这样(它实际上取自上述专业扩展):
<!-- Note that the namespace declaration depends on which version of flux you are actually using -->
{namespace v=Tx_Vhs_ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
<f:layout name="Page"/>
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:section name="Configuration">
<flux:form id="1column" label="1 column layout">
<!-- Options visible in page property -->
<flux:field.input name="settings.carousel.categories" eval="trim" default="4" />
<flux:field.input name="settings.carousel.width" eval="trim" default="1200"/>
<flux:field.input name="settings.carousel.height" eval="trim" default="340"/>
<flux:field.checkbox name="settings.carousel.caption" default="1"/>
<!-- Grid displayed in the page module -->
<flux:grid>
<flux:grid.row>
<flux:grid.column colPos="0" label="Main Content"/>
</flux:grid.row>
</flux:grid>
</flux:form>
</f:section>
<f:section name="Content">
<div class="row" role="main">
<div class="col-md-12" role="section">
<v:page.content.render column="0"/>
<f:if condition="{v:var.typoscript(path: 'lib.addthis.display')}">
<f:render section="AddThis" partial="AddThis" optional="TRUE" arguments="{_all}"/>
</f:if>
</div>
</div>
</f:section>
</div>
大多数通量模板(无论是 Fluidpages 还是 FluidContent)都分为(至少)3 个f:section
流体部分:
-
配置获取您的表单字段
-
Preview影响模板在后端的预览方式
- Usually Content or Main(您可以影响布局文件中的命名,但应遵守我们在示例扩展中传播的约定)呈现您的 FCE/页面模板
The field
项目可以通过访问它们来使用name
属性作为 getter。为了说明这一点,您可以访问{settings.carousel.caption}
从上面的页面模板内部。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)