Views field should show only one term
bjaspan - July 18, 2007 - 21:16
| Project: | Primary Term |
| Version: | 6.x-1.0 |
| Component: | Code |
| Category: | feature request |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | needs review |
Description
The attached patch adds support for Views and token to Primary Term, as well as fixing a node_load()/node_save()-related bug.
| Attachment | Size |
|---|---|
| primary-term-views-token.patch | 6.25 KB |

#1
#2
#3
Does this patch work for 6.x? Can someone roll this into CVS..
#4
Subscribing, greetings, Martijn
#5
The port to Drupal 6 and Views 2 used the default views taxonomy handlers, meaning that the views field shows all available taxonomy terms for the given node. I've written a custom field handler which returns only the primary term, just like the module did in 5.x. (It can't be filtered by vocabulary, but as there's only ever one primary term I feel this is sufficient.) Please review!
#6
160382.patch did the work for me. mvc you saved me a couple of hours of dev of this one.
I'll add more detailed review as I'll implement it in a quite specific environment (primary term + multilingual website). Code is correct.
#7
Just going to add my +1 here and say the patch worked great.
#8
Extended the patch to be able to link correctly to the term page.
Ideally we'd be working more off the views_taxonomy handlers, but for now I needed to patch it so here it is.