I've got my first drupal project which has the potential to make use of taxonomy to help ease the burden. I'm not quite sure what the best way to implement it is, however. This is a volunteer project for a non profit animal shelter, so any advice will be for a good cause :)

Here's what I'm doing... The shelter's primary web purpose is to list animals available for adoption. It should be easy for people to browse animals, perhaps by certain criteria. There are a whole lot of vocabularies I can use here:

- Animal Type (Dog, Cat, Bird, who knows what else)
- Breed (probably with the backported freetagging module?)
- Age (Juvenile, Adult, Senior)
- Gender (Male, Female)
- Color (Brown, Black, etc)
- Weight Range (0-20lbs, 20-40 lbs, etc)

Some ideas I have:

1) use flexinode, one node type for each animal, different vocabularies applied to each node type

This is one option, let's me easily browse each animal type (/flexinode/list/#). But I don't think this will let me easily narrow down browsing. For example, say I want to browse male dogs that are under 50 lbs. This also would be a bit harder to maintain as there would be a bunch of similar but slightly different node types.

2) use flexinode, one generic animal node type

This will let me use taxonomy to browse the major characteristics. But I'm not sure flexinode will work because it means a lot of duplicates. For example, to easily browse, they'd have to tag the animal with a weight range, age range, etc and then also have to enter in the exact weight and age.

3) custom module with taxonomy

I could do an animal module and I could program it so that on submitting it automatically picks appropriate terms. So for example, if they enter a weight of 17 lbs, when the node is created I could assign it the term for a weight range of 0-20 lbs. At least, I think this is possible, I haven't really explored it.

4) custom module without taxonomy

Same as above, but I can just say forget about taxonomy (well, except for animal type, perhaps breed). My reasoning on this one is that instead of having to deal with the issue of having a taxonomy for weight range and an entery for weight, I can just do the weight and use a custom page to browse by those criteria. I just wonder if by doing this I'm throwing away some 'free' functionality drupal can offer with taxonomy.

That's what I've thought of so far. Any other thoughts? In summary, what I need is:

People should be able to come to the website and browse animals available for adoption. These may be dogs, cats, rabbits, other animals. If they want, they should also be able to browse/search for specific characteristics like gender, breed, size, color, etc.

Thanks for any advice!

Comments

shouchen’s picture

I haven't used this module myself, but from its description... it sounds like it might be what you're looking for (using option 1 or 2 in your original post).

http://drupal.org/project/taxonomy_browser

Anonymous’s picture

Hi,

That works for browsing, but I'm not sure that taxonomy will really work for me here. I'm thinking I'm just going to have to do it all manually with a module.

Here's the problem's I'm seeing:

1) Can't really relate a term to another taxonomy. For example, I can't create a Animal type vocabulary and relate that to an animal breed vocabulary (Say if you select dog as the animal type, then you choose a term from the dog_breeds vocabulary).

2) If I do it as a heirarchy (where the dog term of the animal type vocabulary has children which are the different breeds), then all of the browse pages are far too awkward. For example, if you browse to taxonomy/term/# it lists all the children too, which could be 100 different breeds of dogs. This would work if I could retheme that page so that the breeds were in a drop down menu that could be selected, but the taxonomy module doesn't use a themable output here.

3) Still no way to filter it based on ranges of attributes. I really want people to be able to browse by a weight range (some people may want a big dog, some a small dog) but it doesn't make sense to have to input a weight and then choose a weight range.

I think the only way to solve these is to do it all in a module. I can still use taxonomy for animal types and perhaps breeds, but the other stuff needs some custom logic...

Of course I'd love to be wrong about this...

styro’s picture

How complex you make it will partly depend on how many animals they have. The main purpose of the taxonomy terms would be to allow potential adopters to end up with a workable sized list to look through. Too many categories and too little animals means they have lots of short lists to look through. And the opposite means that they could be scrolling through a small number of really long mostly irrelevant lists.

I would keep the vocabularies simple to begin with and bring in new aspects as needed. You don't want to spring too much complexity on staff and users straight away.

Some ideas:

Ideally (theoretically) Breed should probably be sub terms in the Animal Type vocab, but practically I reckon it should just left as a flexinode field or description and handled by the users searching or scanning lists instead. After all there are a lot of different breeds, and unless the shelter has selections available for most breeds it isn't going to be a useful categorisation feature. Also adopters aren't usually too fussy about breed - if they were they would be going to a breeder instead.

You could replace Weight with Size (eg small, medium, large etc) that would fit any animal type.

--
Anton

Anonymous’s picture

Good advice, I think I really need to do it all custom to do it exactly, but I think I can get away with flexinode+taxonomy+some custom php pages. What I'm thinking is doing one flexinode type for animal. Animal type (dog, cat, etc) will be one vocabulary and I can use the taxonomy/term/# pages to browse them. That can be the main interface. Then I can create a refine/search/whatever php page that will let you narrow it by breed, size, etc. That way I can make those work better (I can display only the breeds that are actually available, etc). I can do breed and size as taxonomy vocabularies as well, so my custom search page will really just be a more specific version of taxonomy browser and generate the right URL to view what they want.

Anonymous’s picture

Well, here's what I have that works fairly well... SO close...

I have an animal taxonomy. It's one big heirarcy:

- Animals
-- Dogs
--- Breeds
---- Lab
---- Mixed
---- ...
--- Size
---- Toy
---- Small
---- ...
--- Age
---- Juvenile
---- Adult
---- ...
...

This works pretty well, it gives me a nice breadcrumb heirarchy and the taxonomy/term pages give good browsing.

This might work with a few hacks. The things that make thise close but not quite are:

1) no way to show the breed on the flexinode page, other than the list of tags at the bottom of the node.

2) taxonomy module lists the terms vertically, which takes up a fair bit of space. I'd like them horizontal.

3) I'd like the term listings to display the number of posts within those terms. For example: Golden Retreivers (2) instead of just the term.

4) I'd like the term listing to only display terms which have posts in them.

I think #2,3,4 I can handle with some slight mods taxonomy_context module. #1 I'm not sure about...

zeroyon’s picture

I am trying to solve the exact same issue applied differently..

A form of dynamic search where a user would select the type of animal..

Dog, Cat, Horse.. etc.. Upon selecting the animal the menu would expand to include various options..

Dog
---->Large
---->Small
---->Medium
---->Male
---->Female
---->Puppy
---->Adult
---->Senior

Same basically for the other species as well.. the user would then place a check in a box next to the required atributes and select search... It would then return all pages (nodes) that include all of the selected options...

Any ideas? or how did you correct the problem you were having..

John Bryan’s picture

If I was doing something like this in Drupal 6, or 5,I would create a straight forward Node Type for each species (no module needed). e.g. node types of "Dog" {or Canine}, "Cat" {or Feline} etc.

Taxonomies would be associated with all, or individual Node types as appropriate (again in-built Drupal functionality) e.g. the following Node-type / taxonomy associations:-

Gender taxonomy (Male/Female/Unknown) - ALL species node types
Dog Breed taxonomy - Dog node type
Cat Breed taxonomy - Cat node type
{species}? Weight Range taxonomy - depends on how the information is to be used as to whether a cross species or species/node-type specific association.
{species}? Age group taxonomy - depends on user preference whether a generic infant-imature-adult-elderly or multiple species/node-type specific pup/kitten/foal

But you get the point that by combining node-type and taxonomy based breakdown with selective type-taxonomy associations you obtain the equivelant of the sought after but un-attainable original taxonomy to taxonomy conditional association and avoid un-wieldly mega-hierarchical taxonomy structures. Plus all that without additional modules and compatible with all appropriate add-on modules because it is using native Drupal mechanisms.

For some information you would use cck module with fields for year of birth, actual weight etc. possibly add some custom PHP via trigger/action mechanism to set some taxonomy values such as Age Group based on actual age as calculated from the date of birth, or weight range calculated from actual cck weight field.

Regards

John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31

John Bryan’s picture

If anyone would like such structured sites created I can do this on a commercial basis. You can contact me via my website or tel +44 (0)1235 847040

8¬)

Regards

John Bryan
www.ALT2.com
Application Integration Specialists
Tel: UK 08700 3456-31

zeroyon’s picture

I described it a little better on the following node... I will see what I can accomplish based on your input..

http://drupal.org/node/263719