0

I am developing a Drupal 7 site with a home page that consists of 5 regions. Each region will need to be editable within the Drupal admin system. Each region at a minimum will need to have an image upload and a text/body field. There may be other additional fields for certain regions. In other words not all of these regions will need the exact same fields.

I am not sure what the best way to set this up in Drupal is. I looked at Blocks but they don't have the ability to customize the fields. And I need my image field to be separate because it will be used as a background image for the region, not displayed inline.

I considered creating a custom content type but I wouldn't want the content editors to be able to create multiple nodes for a given region which would likely cause confusion.

I did see a module Node Limit that seems to limit the number of nodes that can exist for a user or content type but it is still listed as an alpha module.

What have you done to deal with a similar situation?

4

2 回答 2

0

听起来创建一个自定义块会很好地为您服务。hook_block_configure()这很容易做到,您可以使用和添加自己的表单/字段hook_block_save()是我的模块文件之一,其中包含带有配置表单的自定义块。

您还可以使用Display Suite模块将字段添加到区域中,如此所述。

于 2013-10-04T16:55:58.620 回答
0

Display Suite 非常适合在表示层中配置节点的字段。

但是您的问题可能是最重要的......也许您的问题是内容构建,而您最强大和最灵活的选项之一是段落模块。

对于段落,您必须创建一个内容类型,将其中的段落捆绑为一个字段,然后创建一个页面并将其设置为您的首页。然后根据需要使用 Display Suite 自定义这些节点类型的演示。

我知道页面的内容类型听起来太多了,但根据您的情况,这可能是您的最佳选择。

当您需要强大的内容创建和高级主题时,段落模块和显示套件模块非常强大。

如果您有任何疑问,请询问。

希望有帮助。

于 2016-11-08T06:37:29.413 回答