First off- I hope this is in the right place. This site kind of overwhelms me with its plethora of places where questions can be asked. :P

Secondly, my situation:
I am trying to create a content type that will list off some attributes for some items in a game I play. Attributes include level(s), power(s), type(s), and restriction(s) on power(s). There is no limit on either how many types or powers a given item could have, or how many restrictions there might be on any given power.

This is currently what I'm able to produce (and the numbers and options could potentially go into infinity)

item
levels
types
power 1
power 2
power 3
type 1, 2
type 3, 4
type 5, 6
restriction 1, 2, 3
restriction 4
restriction 5, 6, 7

(repeat, with any number of options, for the next one)

etc.

When what I want is

item
levels

power 1
type 1, 2
restriction 1, 2, 3

power 2
type 3, 4
restriction 4

power 3
type: 5, 6
restriction 5, 6, 7

(repeat, with any number of options, for the next one)

I tried to do something like power 1, power1level, power1type, power1restriction, power2, power2type, power2restriction...etc., except that then my actual creation form for that content type is really messy, and the view to display it is terrifying to behold.

Is there a cleaner way to set that up? Something in Views or CCK I'm missing, or a module that I can't find due to my limited Drupal vocabulary?

Any help is greatly appreciated!

Comments

marcvangend’s picture

The functionality you describe is in development, it's called 'multigroup' which is short for 'multi value fieldgroups'. A lot of work has already been done in this thread: #119102: Combo field - group different fields into one (588 comments at the moment of writing!). It has been committed to the experimental 6--3 branch of the CCK module. So does that help you now? It doesn't, I'm afraid, because it will take a while before you can actually use this on production sites.... but I still wanted to tell you about it.

Meanwhile, there are a couple of workarounds (one already described by you) to get more or less what you need. Another way would be to create a content type 'power' and give it 'type' and 'restriction' fields. Your 'item' content type would not contain the powers directly, but link to them using a node reference field. It's still not ideal, you would have to judge for yourself if it's good for you.

WorldFallz’s picture

You may want to checkout the http://drupal.org/project/flexifield module.