【问题标题】:Creating fixed FCE with fluidcontent使用流体内容创建固定的 FCE
【发布时间】:2014-04-01 10:16:28
【问题描述】:

这段代码的宽度我可以定义内容:

 <flux:flexform.section name="columns">
    <flux:flexform.object name="column" label="column">
      <flux:flexform.field.input name="demo" label="Demo field" />          
    </flux:flexform.object>
  </flux:flexform.section>

  <flux:flexform.grid>
    <flux:flexform.grid.row>
      <f:for each="{columns}" as="sectionObject" iteration="iteration">
        <flux:flexform.grid.column>
          <flux:flexform.content name="column{iteration.cycle}" label="Column {iteration.cycle}" />
        </flux:flexform.grid.column>
      </f:for>
    </flux:flexform.grid.row>
   </flux:flexform.grid>

这是灵活的。我可以通过该部分添加新的“内容区域”。但这不是我想要的。我想定义一个非常固定的两列和三列FCE。我的编辑不应该决定使用多少列。

我错过了类似的东西:

 <flux:flexform.field.contentArea name="col1" label="Column 1" />           
 <flux:flexform.field.contentArea name="col2" label="Column 2" />           

  <flux:flexform.grid>
    <flux:flexform.grid.row>
        <flux:flexform.grid.column>
              <flux:flexform.content name="col1" />
        </flux:flexform.grid.column>
        <flux:flexform.grid.column>
              <flux:flexform.content name="col2" />
        </flux:flexform.grid.column>
    </flux:flexform.grid>
  </flux:flexform.grid.row>

感谢您对正确方向的提示。

【问题讨论】:

    标签: fluid fedext


    【解决方案1】:

    您已经非常接近使用已有代码的解决方案了。在此示例中,我将使用 new ViewHelper 名称 - 但您可以使用与示例中的 old 名称相同的结果。哪个是哪个,应该很容易发现(注意:我编辑的代码示例中有一个错字,rgid 使用而不是grid - 这样的错字会导致 Flux 出错):

    <flux:grid> <flux:grid.row> <flux:grid.column> <flux:content name="col1" label="Nice name for column 1" /> </flux:grid.column> <flux:grid.column> <flux:content name="col2" label="Column 2" /> </flux:grid.column> </flux:grid> </flux:grid.row>

    并删除带有对象的flux:form.section - 当您制作静态定义的网格时不需要这个。

    然后渲染这个网格:

    &lt;flux:content.render area="col1" /&gt; 等等。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-09-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-09-07
      • 2018-03-09
      • 1970-01-01
      相关资源
      最近更新 更多