I have a list view of nodes. It takes a taxonomy term as an argument. The taxonomy terms in all the node.tpl templates are passed through a function in the template.php that rewrites their output as a link which goes to path example.com/special-view/[taxonomy-term]. The view takes the taxonomy term as an argument and shows all the nodes tagged with it with a field view containing image, title, link and teaser.
Last night I installed OpenCalais which tagged 4000 nodes very well. It, however, puts the terms into about 12 different vocabularies. The term GPS is in three of them. So, although the term GPS has a different TID for each one, the view returns three of each of the nodes tagged with GPS.
The DISTINCT function check box in Views does not work. If I copy the SQL query from views and insert it into phpMyAdmin and manually add DISTINCT after SELECT it returns the proper result set without the duplicates.
If you read the help on views distinct check box it says that it's both not very efficient and that often it doesn't work. Is there a better way to handle this problem? Can I create a module that takes the query from Views with a hook and alters it by adding the DISTINCT function? Since there are unique TID numbers for each of the terms, can I convert the taxonomy term to the correct TID in the argument validation with a custom PHP snippet.
Thanks.
Comments
Hav almost the same problem.
Hav almost the same problem. how did you work this out?