开发者

Drupal7 : content type with many fields

what's the best way in Drupal 7 to handle many fields (> 40). I've to handle hostels content-type. D7 creates as many mysql tables as fields count, so I fear for the performances, but maybe it's not a problem.

Do I have to create entity and sub-entities or create modules to store some data in the same table (a field for equipments, a field for services,开发者_StackOverflow中文版 a field for activites, etc.) or other solution ?

Many thanks for your advices !


40 fields are not that bad as I have seem plenty db tables with more fields.

Drupal is not really that good in OO and normalization but you can:

  • Create multiple custom content type and link them via Corresponding Node References to mimic the entity relationship, foreign key.
  • use taxonomy
  • write you own module never hurts as it help you learn the Druapl way.

Hope that helps


You can leave it as is, because, you know, between performance and flexibility, Drupal chose flexibility:)

if you want to have all these stored in 1 table, it's possible to write module that implements custom fieldset, like this: http://www.lullabot.com/articles/creating-custom-cck-fields however, it's for D6 - I haven't done similar thing for D7 with cck fields in core, so can't give you direction here.

I guess, this and particularly this might help.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜