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.

AttachmentSize
primary-term-views-token.patch6.25 KB

#1

bjaspan - October 12, 2007 - 15:22
Status:needs review» fixed

#2

Anonymous - October 26, 2007 - 16:11
Status:fixed» closed

#3

spiffyd - October 30, 2008 - 21:17
Priority:normal» critical
Status:closed» patch (to be ported)

Does this patch work for 6.x? Can someone roll this into CVS..

#4

Summit - October 30, 2008 - 22:24

Subscribing, greetings, Martijn

#5

mvc - August 19, 2009 - 20:29
Title:Support token and views» Views field should show only one term
Version:5.x-1.x-dev» 6.x-1.0
Status:patch (to be ported)» needs review

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!

AttachmentSize
160382.patch 3.29 KB

#6

spearhead93 - September 26, 2009 - 16:29
Status:needs review» reviewed & tested by the community

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

jonskulski - October 20, 2009 - 18:41

Just going to add my +1 here and say the patch worked great.

#8

jonskulski - October 20, 2009 - 20:07
Status:reviewed & tested by the community» needs review

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.

AttachmentSize
primary_term-160382-8.patch 4.23 KB
 
 

Drupal is a registered trademark of Dries Buytaert.