Hi,

I use the argument Taxonomy: Term synonym in one of my views.

The reason is the following:
My taxonomy-terms sometimes include German special characters like 'ä', 'ü' or 'ö'. To have better-readable urls I created synonyms for these terms where I transformed the 'ä' to 'ae', the 'ü' to 'ue' and the 'ö' to 'oe'.

The view and the filtering by the synonym taxonomy terms works perfectly.

What I am trying to do is the following:
I want the title and breadcrump of the view to show the original taxonomy term when it is called with the synonym.
So if the view is called with my_view/muenchen, the title and breadcrump should print München.
(the taxonomy term is München and has a synonym of Muenchen).

Is this doable somehow?

Comments

esmerel’s picture

Status: Active » Fixed

This is not possible within the current UI; you could potentially do it with some custom code. Otherwise, it'd have to be a feature request.

Status: Fixed » Closed (fixed)

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

eric.smith’s picture

I was trying to do exactly this and found a very useful tutorial here: http://drupal.org/node/365418

Where ducdebreme has the php validator code snippet, use:

if ($argument) {
  $handler->options['title'] = taxonomy_get_synonym_root($argument)->name;
}
return true;

It worked great.

joachim’s picture

Version: 6.x-2.8 » 6.x-2.x-dev
Component: Miscellaneous » taxonomy data
Category: support » feature
Status: Closed (fixed) » Needs work
StatusFileSize
new2.89 KB

It works, but it prevents you from using any of the built-in validators.

Hence reopening.

Here's a patch which adds a handler class for the term synonym argument. This provides an option to use the base term name for the title.

I've tried to inherit breadcrumb support from the regular taxonomy term argument, but I don't need this for my current project, so that part needs a little more work.

joachim’s picture

Title: Arguments: Transform "Taxonomy: Term synonym" to "Taxonomy: Term" in title » "Taxonomy: Term synonym" argument - use original term name in the view title

Slightly clearer title.

joachim’s picture

Oops -- I missed a string in the form definition.

summit’s picture

Subscribing, greetings, Martijn

bartezz’s picture

subscribe

asb’s picture

A status update would be great!

mustanggb’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)