I'm new to Plone, so please excuse me for the probably stupid question
Let's say we're building an animal shelter website. Shelter staff adds a new animal on arrival. Add form contains some fields like:
- name (if known);
- tattoo (if have);
- chip (if have);
- specie (dog, cat, bird);
- breed (particular breed if known);
Obviously, we add custom content-types Animal(Item) class AnimalFolder(Container).
But how to store species, gender, breeds or other classifiers (catalogues?) in Plone-based system?
Should I use folders to build hierarchical references like
Species (folder) > Dog (folder) > Shepherd (folder) > Animal (item)?
Or maybe there other concepts or tools for work with hierarchical taxonomomical systems? What is common practice for Plone projects
I would appreciate any advice or reading link.
Thanks & have a good day,
Maybe GitHub - collective/collective.taxonomy: Create, edit and use hierarchical taxonomies in Plone! can help you? It allows you to create (in the admin section) some hierarchical vocabularies that can be used to set the values in the content types.
If you can put your items into a single category (like cats, dogs, etc., 1:1 relationship) you should take advantage of the hierarchical system that Plone uses to store data. As soon as you have items that belong into multiple categories at the same time (1:N relationship or N:M relationship) you need to use either:
- keywords (like the subjects field in Plone)
- hierarchical vocabularies (like c.taxonomy)
- references (if your categorization is modeled as content objects itself)
The right choice here really depends on your use case. My recommendation would be to try to keep things simple if that's possible.
Support an item in more folders could seem a good idea, but this would create confusion among users, things like export would be difficult, deleting would be a nightmare or at least a performance problem, and so on.
Thank you, guys!
that's a good starting point for now