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 |
Jump to:
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
| Attachment | Size |
|---|---|
| view.JPG | 31.96 KB |

#1
Is this a taxonomy_filter question? It sounds like you want help with Views - or am I not understanding you properly?
#2
Yes, it was a problem with Views sorry and in fact I changed the way of doing it.
#3
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
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
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
#7
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
#9
Here is the Views feature request for the taxonomy depth: #271833: Taxonomy depth for filters and exposed filters