简体   繁体   English

Drupal,视图模块,布局中的组字段

[英]Drupal, Views module, Group fields in layout

I want to group some fields inside a div or similar HTML tag, for example I'm displaying node's title + node's teaser + node's image, I want to group the title and teaser into one DIV in layout for easier CSS styling. 我想将div或类似HTML标记内的某些字段分组,例如,我要显示节点的标题+节点的预告片+节点的图像,我想将标题和预告片分组为一个DIV布局,以简化CSS样式。

I know a silly method to do it in templates, but I want a quicker and easier method (Drag-and-drop in views edit). 我知道在模板中执行此操作很愚蠢,但是我想要一种更快捷,更简便的方法(将鼠标拖放到视图中进行编辑)。 A similar example is CCK Fieldgroup. 类似的示例是CCK字段组。

semanticviews can do it http://drupal.org/project/semanticviews . 语义视图可以做到这一点http://drupal.org/project/semanticviews You can customize html output and group field from the views interface. 您可以从视图界面自定义html输出和组字段。

You can also group the Field with CCK and dipslay the node instead of field. 您还可以将“字段”与CCK分组,并浸入节点而不是“字段”。

Or using node.tpl.php to chose exactly witch field you want to show and how. 或使用node.tpl.php来选择要显示的巫婆字段以及如何显示。

There is also a sandbox project I have used before for grouping views fields into columns at edward_or's sandbox . 我之前使用过一个沙箱项目,用于将视图字段分组到edward_or的sandbox的列中。 I have found this the simplest to use of all the modules. 我发现这是所有模块中最简单的使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM