Can a term have multiple parents from different vocabularies? - drupal

Is it possible in Drupal Taxonomy?
I've many pages related to consumer products to be in following vocabularies:
Electronics
Washing maching
TV
Mobile
Cars
Electrical
... all sorts of
Now Sony TV would go in TV and also in Electronics.
Is it possible to do it in Taxonomy ie to inherit from multiple parents which belong to different vocabularies.

Drupal 6 permits to set multiple term parents.
Adding multiple parents to a term will cause the segemntacaoTeste vocabulary to look for multiple parents on every term. Because multiple parents are not supported when using the drag and drop outline interface, drag and drop will be disabled if you enable this option. If you choose to have multiple parents, you will only be able to set parents by using the term edit form.
You may re-enable the drag and drop interface at any time by reducing multiple parents to a single parent for the terms in this vocabulary.

it is better to use other fields, e.g external Id, or rtid for referring to different vocabularies as compared to having multiple parents per term.

The drupal taxonomy system is not created to have terms that overlap each other. That would mess up the hierarchal order that terms are used for.
In your example, TV should be a child of Electrical, since all TV's are electrical.

I'm pretty sure, that author of this issue has found his answer, but in case if someone else still looking for such solution, this seems to be good start.
http://drupal.org/project/term_relations
I'm not sure how mature this solution is for D7, but if we want to avoid custom module creation, this should be best start.

Related

Drupal 7: Site-wide Taxonomy restrictions--Enforcing 1:1 term:node relationships for specific terms

I'm developing an online magazine, and am using Views to generate blocks for the homepage.
I am using a slightly customized Article as the content type for most of my data, with Views providing blocks with the necessary fields from those Articles. For example: the Latest Blogs View shows the Short Headline and Teaser fields, but the Top Headline View provides a block with the Image and Full Headline fields.
Right now I'm using Views to filter Article by tag, so Articles need to be tagged to show up on the homepage. Most of my blocks are lists and don't need the tightest sorting flexibility. However, some blocks are not lists, or it's important for the end user to have control over the display order of Articles in certain blocks. Is there a way to enforce site-wide 1:1 tagging for term:article relationships. For example, I want to ensure that only one Article is tagged top.news.1 (the first Top News slot), and likewise only one article is tagged top.news.2. When someone wants to add top.news.2 to an Article, the one Article that already has that tag will lose it. Or something like that.
I have played around with Views enough to gather that it is really powerful, so this level of microcontrol might not be necessary with the right configuration, but I think restricting taxonomy versus configuring Views filtration would address the problem more directly.
I've looked around the web and haven't been able to find anything really relevant. Sorry if I missed something obvious.
Thank you!
Is it correct that you (or your site editor) want the ability to:
spotlight a certain nodes
arbitrarily change the order of the spotlighted nodes, or add/remove a node from the spotlight while keeping the position of the other nodes?
If so, your best bet is likely Nodequeue, which does exactly that, and allows you to restrict the number of nodes spotlighted. It's very easy to use and our non-technical clients have no problems with it.
If your use case is different from that or requires more flexibility, Nodequeue may not be the right fit, but it works great for the specific example you're describing.

Should I use custom taxonomy or custom post type?

I've recently taken on a project from a client of mine, after a lot of persuasion I've managed to finally get the website under some kind of CMS. I'm pretty new to Wordpress I've come from an ExpressionEngine background and fancied trying something new for a change, so excuse the lack of knowledge (I'm trying my best! :D).
Now The issue I'm currently facing is that they have very specific directions regarding how they want their content displayed on their website and more importantly how they would like to manage it. They are a travel agent I'm currently putting together the resort directory that will display all of the resorts they offer.
In regards to the current structure of the directory it will be made up of 4 different sections. To give you a better understanding of how I want things to work take a look at this hierarchy below, (I've used turkey as an example, these would need to be dynamic):
/destinations/ This will be our destinations page that will list
all of the countries they currently
offer. I imagine this to be a static
page with some content about the
countries on offer with a list of the
countries below (These will be our
parent taxonomies).
/destinations/turkey/ This will be our parent taxonomy. This
page will also have to have the
ability to add some static content to
insert information about the country
and its locations. Below this will be
a second list, these will be the
different areas of turkey (These will
be children of the parent
taxonomies).
/destinations/turkey/belek/ This will be our child taxonomy, This
page will again need to have the
ability to add some static content.
It will also include our list of
resorts that my client offers within
this location (These will be our
entries/posts).
/destinations/turkey/belek/resort-name
This will be our post/entry page,
here we will have all of the
information on the select resort, the
specifics of this aren't an issue and
I've already got this sorted.
Now, I've done a lot of reading up on custom post types, custom taxonomies and their abilities and uses but I'm hit with a situation at the moment where I can't decide on which route I should take. I've been experimenting over the last few hours with the setup of one custom post type (for resorts) and one hierarchical taxonomy (for locations). Which works some what ok BUT due to the limitations of the taxonomy UI within the admin panel it doesn't allow me to add my static content/images etc. (I'd much prefer to use a WYSIWYG especially from a clients point of view).
So this makes me wonder if it would be worth making two custom post types and scrapping taxonomies all together, making one of the post types resorts and the other locations. With the locations post type I could set it up like the pages module (which would give me hierarchical controls to allow me to organise my locations how I had originally planned) but is this a wise move? I mean from what I've read you shouldn't really organise content this way but I've got a feeling that maybe just a clash of contextual semantics (I could be wrong!). Would there be any limitations for me setting things up this way should I wish to add search functionality in the future? Or anything else for that matter?
I thought I'd mention this before I FINALLY click the submit button (apologies for the great wall of text) but pages... I've read here that they are powerful little gems within Wordpress, how should I be taking advantage of these if I'm using custom taxonomies? How well do they work with listing categories are they what I need?
Right, that about wraps up everything I've got to ask for now - maybe I should have split this into a few posts but hey! I hope this gives you guys enough information about what I'm trying to achieve and please if I am going wrong feel free to point me in the right direction I'm really eager to learn more about Wordpress and it's capabilities.
Regards
Danny
While this is one approach, it sounds like what you really want to be using (rather than custom post-taxonomies) is simply the Page functionality of WP. Everything you're describing is simply the hierarchical structure of the navigation of your pages. Yes, you can use the custom taxonomies to accomplish this same thing, but since you're describing things that tend to be "one" thing (ie: a single resort) you probably don't need the taxonomies.
You might want to look at another option: PODS CMS http://podscms.com
This will give you a simple structure to add custom features to your posts relatively easily... Things like pricing, amenities, and other "organizable" details can be stored using PODS and then referenced across your site for better usability. It might be worth a look!

Is "Similar Entries" or "Similar by Terms" a better module for listing nodes similar to the one the user is currently viewing?

I'm looking at these two modules for a "Related articles" style listing:
Similar by Terms
Similar Entries
Any opinions on either of them? I have a tag system set up so searching by terms would be fine, but it hasn't been updated as recently as the other module. How reliable is "Similar Entries"? Anyone have any field experience with either?
I would also take a look at Content recommendation modules wiki in the Similar Module Review on groups.drupal.org.
Looking at Comparison of Similiar / Relevant by term block modules, Similar By Terms seems preferable because
There is a version for Drupal 7.
It has been updated at the end of July (Similar Entries has been updated on May 2009).
It caches the results.
If I would have to choose a different module, I would choose Relevant Content, which has also a CCK field that allows you to put a list of related nodes in each nodes you want.

Filter a view by user-created tags in Drupal?

I'd like to add a block to the user profile that shows them content listings in their groups based on tags that they have in their profile.
(ie: someone puts a bike up for sale, the user has listed "bike" on their wishlist, it should show up to get their attention)
Since these tags vary user-to-user, I'm not sure exactly how to set up the filter.
Going a little farther, can I sort them by the number of matching tags?
I've found that taxonomy terms and views can be very tricky to get right. The main problems is that taxonomy terms has a one to many relationship with nodes, and views is built to be generic.
It might be quicker to create such a block in a custom module instead, because you may very well get stuck in views before getting what you want. Also you most likely have to create your own sort plugin for views, to get the sorting you want. I haven't seen any module creating something like that, and I don't think it's possible with views core. Creating plugin for views can be very harry, the first time you do it, so unless you know your way around views, I think you will have more luck just creating a block yourself. It's much simpler, than having to extend the views functionality.
Have you looked into Views? You can set up a block with views that retrieves (almost) ANY information from the database.
In your case, you can filter the information that you need and that belongs to the current user, also, sorting is doable via the Views administration.

Placing one vocabularly underneath another?

I've got the following two vocabularies:
Categories, with items:
Big
Medium
Small
Make, with items:
Samsung
Whirlpool
KIC
I've then made a product content type, where these two categories are required.
My problem comes in where I want a menu (preferably using taxonomy menu and dhtml menu) so I can obtain the following menu:
Big
Samsung
Whirlpool
KIC
Medium
Samsung
Whirlpool
KIC
Small
Samsung
Whirlpool
KIC
How can I go about accomplishing this?
I know, normally it would be fairly easy if I made only ONE vocabularly, and for each taxonomy term, i add the make as sub-terms... but I want to do it my way, so that if a new make comes on, that I don't have to go add it to each category. Does that make sense?
Hierarchical Select is the best tool like that I've heard of, but it doesn't play well with two different vocabularies- the module needs the tiered relationships to be defined externally, either by a taxonomy hierarchy, Views, and so on.
I don't think the model of two separate vocabularies will easily be supported by any existing module. If one of the "categories" were presented as a series of nodes tagged by the first category, you might build something with Views & Hierarchical Select to achieve what you want.

Resources