I am getting ready to build my first site using Drupal. I need to understand how best to set up the taxonomy.

main categories

    vehicles
  • cars
    • sedans
    • carolla
    • maxima
    • etc...
      coop
    • brand 1
    • brand 1
    • etc...
  • trucks

secondary category

    color
  • red
  • blue
  • green
    transmission
  • automatic
  • manual
    valves
  • ...
  • ...
  • As i write this i think i'm answering my own question.
    Would a set up like this would allow me to 1) Get all info under vehicles 2) get all infor under coops 3)get just the infor on blue coops 4) get all info on blue coups with manual transmissions

    if possible should you share seconday categories?

    any help would be much appreciated.

Comments

zilla’s picture

okay, so you have a content type (pretend you create a new one called 'car reviews' - it's the same as blog or story, just a new name to keep tabs on for your own purposes)

now hop back to vocabulary (after knowing what content type these terms relate to) and create your top level vocabularies - though i think this would make more sense:

car type (1st top level vocab)
-sedan
-truck
-minivan
-etc

car brand (another top level vocab)
-nissan
-ford
-etc

car color (another top level)
-red

...and so on and so on - a top level for each core descriptive element [ and yes, vocabs can be shared by other content types, or multiple vocabs for one content type and so on)

now within each of those vocabularies (not inside terms, just looking at top level admin/contentmgmt/taxonomy) visit 'edit this vocabulary' and scroll down and for each one, assign it to 'car review' (under content type) - and make required if you want it to be required

now when you go to review a car, you'll see a bunch of drop downs from which you select brand/type/color (each in its own separate dropdown)

by doing this, you are laying the foundation for faceted search (actually its own module which is perfect for what you're doing - check out faceted search module)

also, by doing this, you can create all sorts of search because you can combine terms - eg vocabulary `1 term '7' is sedan, vocab 2 term 9 is nissan and vocab 3 term 18 is blue - you can then find ways to search or display /7+9+18

also check out CCK - you may find it very useful for custom fields (like year of make, location, links to manufacturer, etc)

in fact, if you want to see a GREAT example of the kind of stuff you can do with this multiple vocabularies, check out www.drupalmodules.com and look at how he does search - two ways: regular search with filters and restrictions, and module search (custom code, but possibly soon to b e a drupal module ;)

rabidDog’s picture

Rdub

So, by creating a new content type and associating these taxonomy, I will only get the taxonomy for "car reviews" and no other ie boating.

zilla’s picture

for example, say you create a content type called "car reviews" and add whatever kinds of extra fields you want with CKK (optional), then you create a totally different content type called "bicycle reviews' with its own unique needs (e.g. 20", 26", kids frames, etc)

there is a strong chance that they may in fact "share a vocabulary" like "color" - so in that one vocab, color, you'd simply scroll down to content types and make it available to 'bicycle reviews' too...

and no, no bloating - only what you add will be visible.

for the majority of my own content, i have one defined vocab and one separate 'freetagging vocab' - the freetagging vocab is associated with *many* content types (just like my 'color example' above), but certain content types have only one other vocab (like 'location' for one, or 'some other crap' for some other one)

all a *user* will see when creating that content type is two lines: one for freetags (open text type input, etc) and one little drop-down box to select the defined vocab term...that's it. no other bloating. it's all up to you. you could associate 20 vocabs and force users into huge drop down or open text situations, but that's awkward and slows down content creation..