Depth in taxonomy filter

Nicolas_85 - July 10, 2008 - 07:48
Project:Views
Version:6.x-2.x-dev
Component:taxonomy data
Category:feature request
Priority:normal
Assigned:Unassigned
Status:duplicate
Description

I have a view with a field in filters : "Taxonomy : Terms for Categories".
"Categories" is composed as :

Cat1
--Colocation
Cat2
--Musique

I don't know how to adjust parameters (depth) to have as a result only :
Colocation
Musique
in my final box

Regards,

Nicolas

AttachmentSize
view.JPG31.96 KB

#1

styro - July 10, 2008 - 23:09

Is this a taxonomy_filter question? It sounds like you want help with Views - or am I not understanding you properly?

#2

Nicolas_85 - July 15, 2008 - 08:15

Yes, it was a problem with Views sorry and in fact I changed the way of doing it.

#3

pkej - July 15, 2008 - 08:26

There is a module called taxonomy_lineage which integrtes with views and might be of help.

Could you explain how you solved your problem for my benefit ;)

#4

Nicolas_85 - July 15, 2008 - 10:05

In fact I decide to remove items from the list using template.php:

function phptemplate_views_display_filters_VIEWNAME($view){

$form = drupal_retrieve_form('views_filters',$view);
$view = $form['view']['#value'];
$options = $form['filter0']['#options'];
$filters = $view->filter[1];

foreach($options as $option=>$value){
if(in_array($option, array('4','7'))){ // id in the array
unset($options[$option]);
}
}
$form['filter0']['#options'] = $options;

drupal_process_form('views_filters',$form);
return drupal_render_form('views_filters',$form);
}

#5

styro - July 15, 2008 - 21:20
Project:Taxonomy Filter» Views
Version:5.x-1.1» 5.x-1.x-dev

I've changed the project to Views - you'll need to set your Views version. If you've already solved your problem, please set the status to 'fixed' to avoid cluttering up the Views queue :)

#6

Nicolas_85 - July 16, 2008 - 09:28
Status:active» fixed

#7

rares - July 29, 2008 - 00:03
Version:5.x-1.x-dev» 6.x-2.x-dev
Component:User interface» taxonomy data
Category:support request» feature request
Assigned to:Nicolas_85» Anonymous

This is a feature request that was initially made for another module, but I think it is fair game for inclusion into a future release of Views. The idea is to have a filter or depth argument for a View of Terms (Taxonomy). Maybe it's been requested already, in that case can someone mark it as duplicate?

#8

rares - July 29, 2008 - 00:03
Status:fixed» active

#9

rares - July 29, 2008 - 00:06
Status:active» duplicate

Here is the Views feature request for the taxonomy depth: #271833: Taxonomy depth for filters and exposed filters

 
 

Drupal is a registered trademark of Dries Buytaert.