The attached patch adds support for Views and token to Primary Term, as well as fixing a node_load()/node_save()-related bug.

Comments

bjaspan’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)
spiffyd’s picture

Priority: Normal » Critical
Status: Closed (fixed) » Patch (to be ported)

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

summit’s picture

Subscribing, greetings, Martijn

mvc’s picture

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
StatusFileSize
new3.29 KB

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!

spearhead93’s picture

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.

jonskulski’s picture

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

jonskulski’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new4.23 KB

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.

sethcohn’s picture

Assigned: Unassigned » sethcohn

+1 to this

drifter’s picture

Status: Needs review » Reviewed & tested by the community

#8 works as advertised.

sethcohn’s picture

thanks Drifter! I'll be rolling up a new version shortly. Finally getting done with a big golive push, and getting breathing space again.

brianV’s picture

Status: Reviewed & tested by the community » Fixed

Drifter's patch in #8 committed:

http://drupal.org/cvs?commit=435648

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.