2

我在 TYPO3 6.2 上使用了通量(7.0.0)和流体含量(4.0.0)。我的内容模型如下,使用“复合模式”:

  • 有一个内容元素“行”(不同风格),它是一个容器元素,用于包含更多的内容元素。它只有一个内容子列。
  • 有“叶子”内容元素,用于显示实际内容。例如“单个图像”、“文本”,还有“行”。这些叶子中的每一个都有一个widthas 属性。

整个事情都是为引导而呈现的,在每一行中,孩子们只是漂浮在左边。

我的问题是:如何在后端网格视图中布局内容元素以类似于前端输出?如果每个内容元素都可以从其属性中添加一个显示宽度并左浮动,那将是一个很大的改进。

内容元素中的网格定义如下所示:

<flux:flexform.grid>
    <flux:flexform.grid.row>
        <flux:flexform.content name="rowcontent" label="{f:translate(id: 'row.column.label')}" />
    </flux:flexform.grid.row>
</flux:flexform.grid>

后端当前布局的示例。每个图像内容元素都设置了 25% 的宽度。如果它们彼此并排,那就更好了:

后端的当前布局

4

1 回答 1

3

In the preview section of your template you would normally use <flux:widget.grid />.

Instead:

1) Copy over the files from flux / Resources / Private / Templates / ViewHelpers / Widget / Grid / and flux / Classes / ViewHelpers / Widget / to your extension.

2) Rename inside everything you copied to fit your vendor prefix / namespace.

3) Include that new namespace inside your row template and use <YourNamespace:widget.grid /> for the preview.

4) Now you can customize the templates you copied over so that they are floated instead of in a table.

于 2014-04-05T00:35:33.970 回答