首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PGrid和CGrid不呈现

PGrid和CGrid不呈现
EN

Stack Overflow用户
提问于 2014-12-11 07:45:37
回答 1查看 164关注 0票数 1

我正在使用TYPO3 6.2.7和所有最新版本的Flux、VHS、fluidcontent和fluidpages。

我使用的页面模板不会在后端渲染内容区域。它只显示默认的TYPO3列。

这是我的首页模板。

代码语言:javascript
复制
{namespace v=Tx_Vhs_ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
<f:layout name="FrontPage" />
<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="frontpage" label="Startseite">

    <flux:grid>
        <flux:grid.row>
            <flux:grid.column colPos="0" name="content" />
        </flux:grid.row>
    </flux:grid>

</flux:form>

</f:section>

<f:section name="Resources">
    <f:render partial="headerData" section="frontpage" />
</f:section>

<f:section name="Content">
    <v:content.render column="0" />
</f:section>

<f:section name="Header">
    <f:render partial="Header" />
</f:section>

</div>

还有一个问题,就是元素im使用的是fluidcontent。它应该是一个简单的框,您可以在其中输入一些其他内容。但是“添加内容”按钮不会出现在后台。这是模板中的一些代码。

代码语言:javascript
复制
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
<f:layout name="content" />
<div xmlns="http://www.w3.org/1999/xhtml"
 xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
 xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">

<f:section name="Configuration">
<flux:form id="contentbox" options="{group: 'Fluid FCEs', icon: '../typo3conf/ext/sw_fluidfce/Resources/Public/Icons/shadowbox.gif'}" label="Flexible Contentbox" description="Very flexible contentbox. You can just set a padding arround a text or create a shadowbox. You can also create a Header Box or a Link Box.">
    <flux:field.checkbox name="shadow" label="Create a shadow" />
    <flux:field.checkbox name="nomargin" label="No Margin (Abstand nach unten)" />
    <flux:field.checkbox name="nopadding" label="No Padding (Abstand nach innen)" />
</flux:form>
<flux:grid>
    <flux:grid.row>
        <flux:grid.column name="content" colPos="0" label="Content inner" />
    </flux:grid.row>
</flux:grid>
</f:section>

<f:section name="Preview">
<b>Flexible Contentbox</b>
{f:if(condition: '{shadow} == "1"', then: '<br />Wirft Schatten')}
{f:if(condition: '{nomargin} == "1"', then: '<br />Kein Margin (Abstand nach unten)')}
{f:if(condition: '{nopadding} == "1"', then: '<br />Kein Padding (Abstand nach innen)')}
<flux:widget.grid />
</f:section>

<f:section name="Main">

<div class="fce_contentbox {f:if(condition: '{shadow} == "1"', then: 'shadowbox shadow')} {f:if(condition: '{nomargin} == "1"', then: 'nomargin')}">
    <div class="fce_contentbox_inner {f:if(condition: '{nopadding} == "1"', then: 'nopadding')}">
        <flux:content.render area="content" />
    </div>
</div>

</f:section>

</div>

你知道问题出在哪里吗?我尝试了一些旧版本的flux等,但它没有解决问题。

致以最好的问候,Sören

EN

回答 1

Stack Overflow用户

发布于 2014-12-13 23:58:04

关于页面布局:

如果它显示默认的TYPO3列,那么您可能没有在页面记录中选择fluidpages后端布局。在最近的fedext/TYPO3版本中,您需要编辑根页面的属性,并在“外观”标签中将"Backend Layout (仅此页面)“和"Backend Layout (此页面的子页面)”设置为“”。

关于content元素:

网格中不需要/不允许使用<flux:form.content><flux:grid.column>会自动处理所有事情。你必须这样组织它:

代码语言:javascript
复制
<f:section name="Configuration">
    <flux:form>
        [...]
        <flux:grid>
            <flux:grid.row>
                <flux:grid.column colPos="0" name="main" />
            </flux:grid.row>
        </flux:grid>
    </flux:form>
</f:section>

此外,您还必须提供一个在BE中显示栅格的预览部分。例如:

代码语言:javascript
复制
<f:section name="Preview">
    <flux:widget.grid />
</f:section>

或更短:

代码语言:javascript
复制
<f:section name="Configuration">
    <flux:form>
        [...]
        <flux:form.content name="main" />
    </flux:form>
</f:section>

<flux:form.content>是具有一行和一列且colPos为0的网格的简写语法。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27412973

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档