Is it possible to have seperate/multiple taxonomy term views that use the same vocab but sort different types of nodes (content types).

The caveat here is that I still want to use the normal term alias paths, such as "country/state/city" for navigation and not do someting such as "location/$arg" and build my own menu (I'm using Taxonomy Context contextual block for navigation).

For example I have two vocabs - a freetags vocab with paths like "tags/my-free-tag", and a locations vocab with path such as "country/state/city".

I also have several content types - Hotels, Attractions & News, but I dont want them all showing up in the locations vocab (only want Hotels and Attractions to show for terms in the locations vocab).

They all use the locations vocab, but I dont want "News" showing up in the "Hotels" section.

I want news to show up in the freetags section - i.e. tags/a-free-tag = a list of news items, but not Hotels or Attractions.

Why attach location terms to News I hear you ask?

So I can do something like this with the term "See all hotels in ...." on the teaser and node.

Comments

Leon.lb’s picture

Would it help if I explained this better, am I not very clear in my post? I realise it's only been 24 hours but I am on a tight schedule (arent we all?).

Really I am looking for proof of concept - can this be done or not. Any advice or comment most appreciated.

Leon.lb’s picture

I've assumed all along that I can/could possibly do this with arguement handline code, but being a complete noob to all this its hard to know where to start...

Please dont snigger, but I tried this... but no go (no effect at all... hmmm), if someone can point me in the right direction I would most appreciate it. (php tags for highlighting only)

$args[0] = arg(2);
$tid = $args[0];

$query = db_query("SELECT d.vid from {term_data} d WHERE d.tid  = '%d'", $tid);

$vocab = db_fetch_array($query);

$nodeterm = array();
foreach ($vocab as $term) {
  $nodeterm[$i] = $term;
} 
if(in_array(6, $nodeterm)) { //where 6 is my vocab
$view->filter = array (
     'value' => array (
  3 => 'hotel',
  4 => 'attraction'
),
 }
 else {
 $view->filter = array (
  'value' => array (
  0 => 'blog',
  1 => 'page',
  2 => 'story'
),
}
return $args;
sun’s picture

Status: Active » Closed (won't fix)

Sorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support.
If you were able to solve this issue on your own in the meantime, you might want to add the involved steps to this closed issue, so other users searching for a similar solution might find it.