开发者

Complex CCK field

开发者 https://www.devze.com 2023-03-10 04:47 出处:网络
I have a rather complex challenge. My new content type called MeetingVenue needs to save multiple occurances of mutiple categories of information. An example is:

I have a rather complex challenge. My new content type called MeetingVenue needs to save multiple occurances of mutiple categories of information. An example is:

  • Node "MeetingVen开发者_如何学Pythonue" needs to have information on multiple meeting rooms.
  • Each one of those rooms can be setup as a Lecture Theatre, Classroom, Boardroom or Dance Hall.
  • In each one of those configurations, the capacity is different so I need to save that information too.

I am trying to find/create a CCK field that will allow me to to pair each one of the room types i.e (Lecture Theatre, Classroom, Boardroom and Dance Hall) to their capacity value. Much like an array.

On top of that, I need to associate each one of the arrays I create to a unique name.

Does a module which is the partial/full solution already exist? If not, can I create a custom module to do it?

Visual:

Complex CCK field


Try using 2 different content types with a node reference field tying them together. For instance, you would have Building (or Venue, whatever you want to call it) with simply a name of the place, maybe the address (love Gmap/Location combo for D6!). Then you have a content type Meeting Room which has a field for capacity and a node reference field for Building. Use the nodereference_url module to link them together. This module is great because it creates a link on the Building node to "Add a Meeting Room in this Building", sends you to node/add/room and can be set to redirect after you have created to the created node (the room) or the referenced node (the building) to add more rooms.

The beauty of this approach is that it's simple to create a view of rooms with an argument on nid to show only the rooms and capacity and other info on each room

0

精彩评论

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