【问题标题】:EXT:fluidcontent does not accept element configurationEXT:fluidcontent 不接受元素配置
【发布时间】:2013-09-24 07:00:09
【问题描述】:

我已经将 Fluid ContentElements 与 FED 和 Flux 一起使用,并想尝试将我现有的元素移植到 TYPO3 6.1.5。

我已经阅读了 FED 最近的变化,因此按照项目主页上的建议安装了 EXT:flux 和 EXT:fluidcontent。

在我的旧 FCE 都没有开箱即用后,我尝试创建一个非常简单的元素,其中仅包含一个文本输入字段作为概念验证,并学习 FCE 的新方法。

这是我的代码:

(TypoScript 和 HTML 改编自 Typo3 V6: How to create a content element container? (without TV)

TypoScript

<INCLUDE_TYPOSCRIPT: source="FILE:EXT:css_styled_content/static/setup.txt">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:fluidcontent/Configuration/TypoScript/setup.txt">

plugin.tx_fed {
    fce.myext {
        templateRootPath = EXT:myext/res/{$global.project_path}/assets/html/fluidCE/Templates/
    }
}

EXT 中的 HTML 模板:myext/res/{$global.project_path}/assets/html/fluidCE/Templates/

{namespace flux=Tx_Flux_ViewHelpers}

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

<f:layout name="Content" />

<f:section name="Configuration">
    <flux:flexform id="textfoo" label="TextFoo">
        <flux:flexform.field.input name="textfoo" label="textfoo" />
    </flux:flexform>
</f:section>

<f:section name="Preview">
    <h2>{textfoo}</h2>
</f:section>

<f:section name="Main">
    <h1>{textfoo}</h1>
</f:section>

</div>

我现在在 Content-Element 中得到的内容如下:

FluidCE Backend Form

所以我的问题如下:

  • 为什么我的文本输入字段不见了?
  • “标题”字段从何而来?

感谢您的帮助,非常感谢。

最好的问候, 格里戈里

编辑:我现在启用了 Flux 调试并收到以下消息:

Flux Debug
Flux View Tx_Flux_MVC_View_ExposedTemplateView is able to read stored configuration from file /Users/username/workspace/projectname/typo3conf/ext/myext/res/projectname/assets/html/fluidCE/Templates/TextFoo.html

Flux Debug
The template file "" was not found. (1366824347)

【问题讨论】:

    标签: typo3 fluid flux fedext


    【解决方案1】:

    所以,在#typo3@chat.freenode.net 的 IRC 会话之后,这些家伙(感谢 @cedricziel 和 @amkoroew)和我首先发现了 EXT:fluxEXT:fluidcontent 的所有 TER 版本不工作,但来自 GitHub 的那些是:

    模板文件的路径需要遵守默认的extbase约定,即EXT:myext/Resources/Private/Templates/Content/myFCE.html

    (有一种方法可以使用非标准路径,但我没有尝试过)

    EXT:fluidcontent 还期望 TypoScript 设置如下:

    plugin {
        tx_myext {
            view {
                label = Fluid Content Elements
                extensionKey = myext
                templateRootPath = EXT:myext/Resources/Private/Templates
            }
        }
    }
    

    更新扩展并将文件移动到新位置后,FCE 将按预期工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-07-08
      • 2016-01-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多