User login

Vocabularies for vocabularies, or paired-term taxonomy

As long as it's theoretical, I'm pure genius.

http://groups.drupal.org/node/4658#comment-21689

Hello freeburj,

Taxonomy totally should be able to do that, but what you're asking is actually pretty tough. In the broadest sense, taxonomy lets you set up an arbitrary set of terms for content, and you want to then apply an arbitrary set of terms to those terms that apply to content.

That's pretty awesome and I'm not sure even the taxonomy core (and basically unused) feature of related terms would do it. A linguist using Drupal for a site claimed that based on his investigation Drupal could do any taxonomy structure imaginable, so I'm going to assume I'm wrong here. Cross-vocabulary related terms should mean you don't have to create your own database tables to pair vocabularies with sets of terms, but I think you'll have to take

It's not difficult in principal to take over taxonomy's entry form to enforce more structure. I have a custom front end for the in-progress Place module's place_taxonomy component, taking over term weights to describe country, province/state, and city/town/village levels. (I still need to expose taxonomy weight to views in a custom way.)

If you're up for taking over the input and saving of term-node relationships, it shouldn't be too hard... oh, yes it would be. You can't use the related terms table, because the relationship depends on the content you are joined to. This would need a new database table: Term ID from one vocabulary, Term ID from the other vocabulary, and Node ID, with each row unique when all three are included.

Another approach would be to make each skill a node: make a node type called "Skill" that either must be authored by, or has a userreference to the user with the skill in question (you'll have to pick one, a form_alter could limit regular users to creating skills only for themselves) and has no body (unless you want a place for notes). Assign the content type both your vocabularies, skill and level of expertise, and require both. Then use node auto title to replace the title of the node with the user's name plus their skill, just to get the title out of the way. Then each user can have an arbitrary number of skills that belong to them, defined by skill name and level of expertise. Not sure how difficult it would be to allow the input of multiple skill nodes at once, if that workflow is important to you.

Anyone have other ideas, even (gasp) non-Taxonomy approaches?

~ ben melançon

member, Agaric Design Collective
http://AgaricDesign.com - "Open Source Free Software Web Development"

Resolution

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.