【问题标题】:Custom Fluid Content elements not detected未检测到自定义流体内容元素
【发布时间】:2014-03-24 09:59:56
【问题描述】:

我正在使用 Typo3 6.2 的最新 beta5,具有流体内容、通量和 vhs 的开发分支。

流体内容元素可见,但没有类型: https://www.evernote.com/shard/s254/sh/e6af43fa-be0f-498f-88f9-27655bf8afea/b63bb23242890430c906a136123f5a39

包含排版文件。

这是我的 TS:

plugin.tx_kpcolcontent {
    view {
        label = Column Content
        extensionKey = kpcolcontent
        templateRootPath = {$plugin.tx_kpcolpages.view.templateRootPath}
        partialRootPath = {$plugin.tx_kpcolpages.view.partialRootPath}
        layoutRootPath = {$plugin.tx_kpcolpages.view.layoutRootPath}
    }
}

模板在 EXT:kpcolcontent/Resources/Private/Templates/Content/Columns.html

{namespace flux=FluidTYPO3\Flux\ViewHelpers}

<f:layout name="Default" />

<f:section name="Configuration">
  <flux:flexform id="columns" label="Columns">
    <flux:flexform.grid>
        <flux:flexform.grid.row>
            <flux:flexform.grid.column>
                <flux:flexform.content name="left" label="Left content" />
            </flux:flexform.grid.column>
            <flux:flexform.grid.column>
                <flux:flexform.content name="right" label="Right content" />
            </flux:flexform.grid.column>
        </flux:flexform.grid.row>
    </flux:flexform.grid>
  </flux:flexform>
</f:section>

<f:section name="Preview">
  <flux:widget.grid />
</f:section>

<f:section name="Main">
  <div class="row">
    <div class="span6">
        <flux:flexform.renderContent area="left" />
    </div>
    <div class="span6">
        <flux:flexform.renderContent area="right" />
    </div>
  </div>
</f:section>

【问题讨论】:

  • 这可能与 CMS 处于测试阶段和扩展分支正在开发中有关 :)

标签: typo3 fluid typo3-6.2.x


【解决方案1】:

TYPO3 6.2x 带助焊剂

从以下位置下载:
助焊剂:https://github.com/FluidTYPO3/flux
Fluidpages:https://github.com/FluidTYPO3/fluidpages(用于页面模板)
流体内容:https://github.com/FluidTYPO3/fluidcontent
vhs:https://github.com/FluidTYPO3/vhs

排版:

plugin.tx_fluidpages.collections.kpcolcontent {
   templateRootPath = {$filepaths.private}Templates/
    partialRootPath = {$filepaths.private}Partials/
    layoutRootPath = {$filepaths.private}Layouts/
}
plugin.tx_fed.fce.kpcolcontent{
    templateRootPath = {$filepaths.private}Elements/Content/
    partialRootPath = {$filepaths.private}Partials/
    layoutRootPath = {$filepaths.private}Layouts/
}

模板文件 EXT:kpcolcontent/Resources/Private/Templates/Elements/Content/Columns.html

{namespace v=Tx_Vhs_ViewHelpers}
{namespace flux=Tx_Flux_ViewHelpers}

<f:layout name="Content" />

<f:section name="Configuration">
    <flux:flexform wizardTab="Custom Elements" label="Two Column Container" id="twocolumn" description="" icon="">
        <flux:flexform.grid>
            <flux:flexform.grid.row>
                <flux:flexform.grid.column>
                    <flux:flexform.content name="left" label="Left content" />
                </flux:flexform.grid.column>
                <flux:flexform.grid.column>
                    <flux:flexform.content name="right" label="Right content" />
                </flux:flexform.grid.column>
            </flux:flexform.grid.row>
        </flux:flexform.grid>
    </flux:flexform>
</f:section>

<f:section name="Preview">
  <flux:widget.grid />
</f:section>

<f:section name="Main">
  <div class="row">
    <div class="span6">
        <flux:flexform.renderContent area="left" />
    </div>
    <div class="span6">
        <flux:flexform.renderContent area="right" />
    </div>
  </div>
</f:section>

内容布局:EXT:kpcolcontent/Resources/Private/Layouts/Content.html

<f:layout name="Content" />
<f:render section="Main" />

享受 TYPO3 6.2x + Flux + Fluidcontent

【讨论】:

  • 如果我在后端设置字段中添加打字稿,则无法在扩展 TS 中工作。选择也没有标签,生成的 .FED_CONTENT 有一个空的标题键。切换到它时还会引发有关未加载视图助手的错误。我会再等一段时间,直到事情稳定下来,然后以其他方式做我需要的事情。
猜你喜欢
  • 1970-01-01
  • 2020-05-30
  • 1970-01-01
  • 2014-08-21
  • 2015-04-27
  • 1970-01-01
  • 2018-03-08
  • 2015-05-02
  • 1970-01-01
相关资源
最近更新 更多