【问题标题】:fluidcontent as container does not render作为容器的流体内容不呈现
【发布时间】:2015-06-29 18:45:40
【问题描述】:

我正在尝试使用通量和流体模板引擎建立一个基于 von TYPO3 6.2 的小型网站。 我用:
流体:6.2 通量:7.2.1 流体页面 3.2.3 流体含量 4.2.2 流体内容核心:1.1.3 vhs:2.3.3 生成器:0.18.0

我已将构建器用于提供程序扩展,并设法制作了页面模板和内容模板。 但是当我尝试使用内容元素作为内容容器时,它不会被渲染。

我在这里阅读了类似的文章以及文档,但我找不到解决方案。

包含fluidcontent_core的静态TS。

我也复制了一行

$GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'] = array('fluidcontentcore/Configuration/TypoScript/');

在附加配置中。

以下是我的最小 Conatiner 模板:

div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
 xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers">

<f:layout name="Content" />

<f:section name="Configuration">
    <flux:form id="btContainer" label="UpContainer" options="{group: 'stth'}">

    </flux:form>
    <flux:grid>
        <flux:grid.row>
            <flux:grid.column name="Col2" label="Inhalte" />
        </flux:grid.row>
    </flux:grid>
</f:section>

<f:section name="Preview">
    <!-- If you wish, place custom backend preview content here -->


</f:section>
<f:section name="Main">
        <div class="container addedClass">
            <f:comment><flux:content.render area="Col2" /></f:comment>
            <v:content.render column="Col2"  />
        </div>
</f:section>

我尝试使用 v:content.render 或flux:content.render 渲染内容,但没有输出。 我只得到一个空的

  <div class="container addedclass"> </div>

在后端,我看到了标有“Inhalte”的容器,我可以添加内容。 (内容是标准 CE,如文本或标题)

有人可以给我一个提示,我接下来可以做什么。

提前谢谢你 st

1.7.2015 更新

我已经设置了一个新的 TYPO3 6.2 并使用了预配置的“站点 kickstarter”。 当我添加 AdditionalConfiguration.php 时,我看到有 2 行要复制:

    // fluidcontent_core
    $GLOBALS['TYPO3_CONF_VARS']['FE']['contentRenderingTemplates'] =   array('fluidcontentcore/Configuration/TypoScript/');
    $GLOBALS['TYPO3_CONF_VARS']['FE']['activateContentAdapter'] = 0;

第二个对我来说是新的。

然后我在我的 Provider 扩展中复制了我的容器模板:是的 - 它可以工作。

我尝试在我的原始 TYPO3 实例中使用 AdditionalConfiguration 的第二行——但它不起作用。所以我不确定这是否是解决方案。也许有人更有洞察力?

再次感谢您的帮助。

【问题讨论】:

  • Flux:grid.column 不需要 colPos,但这可能会产生冲突。您在数据库中看到了什么?此外,您使用流体内容核心。我假设您已经为流体内容核心插入了 ts 并禁用了 css_styled_content? (甚至卸载 css_styled_content ?)
  • 是的,我已经在 Main TS-Template 中为流体内容核心插入了 TS -> 编辑整个模板记录 -> 包括我没有安装 css_styled_content;我什至从 LocalConfiguration.php 中删除了该行并再次测试-> 相同的效果。我看不到我正在使用 colPos——你能告诉我我在哪里使用它吗?数据库:我不知道我应该在哪个表中搜索:我现在已经在我的容器“Inhalte”中放置了一个常规的 Text CE;文本可以在 tt_content 中找到,但不能在 CF_fluidcontent 中找到。这是正确的吗?
  • cf_ 是缓存表在 tt_content 中查找(因为它就是这样)

标签: typo3 fluid


【解决方案1】:

我在您的代码中看到了一些错误:

您的&lt;flux:grid&gt; 代码在&lt;flux:form&gt; 之外,它应该在里面。请检查下面的整个代码:

<div xmlns="http://www.w3.org/1999/xhtml" 
         xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
         xmlns:v="http://fedext.net/ns/vhs/ViewHelpers" 
         xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">

         <f:layout name="Content" />
         <f:section name="Configuration">
            <flux:form id="btContainer" label="UpContainer" options="{group: 'Custom elements'}">
                <flux:grid>
                    <flux:grid.row>
                        <flux:grid.column name="Col2" style="width: 100%" label="Inhalte" ></flux:grid.column>
                    </flux:grid.row>
                </flux:grid>
            </flux:form>
        </f:section>

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

        <f:section name="Main">
                <div class="container addedClass">
                    <flux:content.render render="1" area="Col2" />
                </div>
        </f:section>

</div>

【讨论】:

  • 我将 '' 放在 '
    ' 中,但这并不能解决问题。我也试过'render = 1'但没有任何反应。我想知道是否有更好的调试方法——一种逐步测试?我可以在 FE 中看到 'div class="container addedClass" 的事实表明至少渲染了 Main 部分,但没有渲染 '' 的内容
猜你喜欢
  • 1970-01-01
  • 2014-07-15
  • 1970-01-01
  • 1970-01-01
  • 2012-04-21
  • 2020-07-26
  • 2013-09-08
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多