Control over vocabularies for filter

equalspeterd - February 4, 2009 - 16:54
Project:Event
Version:6.x-2.x-dev
Component:API
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review
Issue tags:taxonomy
Description

I've been using this module for quite some time, and I have a recurring need to be able to control which vocabularies get rendered in the filter control provided in the various views.

At the moment, this module looks for all vocabularies enabled for the content types, and incorporates all the terms from all those vocabularies.

Instead, it would be nice to allow the module's admin interface to indicate which vocabularies to include (rather than all enabled). Since my site allows free tagging, the filter control tends to get rather large over time.

If other folks share this need, I can probably contribute a patch for core (as i have found no way to override the values in this control at the theme layer).

#1

equalspeterd - February 4, 2009 - 18:09
Status:active» needs review

Turned out to be much easier than i was thinking it would be. The attached patch adds the vocabulary control to the overview admin page, and filters the taxonomy filter control accordingly.

AttachmentSize
event.module.369162.patch 2.26 KB

#2

equalspeterd - February 4, 2009 - 19:52

forgot to test the default case. use this patch instead of the patch in #1 instead

AttachmentSize
event.module.369162-2.patch 2.36 KB

#3

equalspeterd - March 12, 2009 - 17:13
Category:support request» feature request

moving this to a feature request category. any chance of seeing this in the next point release?

#4

Passionate_Lass - April 8, 2009 - 08:18

I need this functionality too, unfortunately, I have no way to install/use patches. Think you could make me a .zip of the current events module with the changes? :) I would really appreciate it.

#5

Patrizio - July 24, 2009 - 10:08

Sorry but the control

<?php
if(count($activeVocabularies)>0 and array_search($vocab->vid,$activeVocabularies)) {     
   
$vs[$vocab->vid] = $vocab;
} else {
   
$vs[$vocab->vid] = $vocab;
}
?>

it's a little bit stupid, maybe we can change it in
<?php
if(count($activeVocabularies)>0 and array_search($vocab->vid,$activeVocabularies)) {     
   
$vs[$vocab->vid] = $vocab;
} else if(
count($activeVocabularies) == 0) {
   
$vs[$vocab->vid] = $vocab;
}
?>

#6

jannalexx - October 13, 2009 - 20:00

#2 patch works after applying #5 mod
list specific vocabularies without useless selections... a must have especially if free tagging is enabled
very nice, tnk u

 
 

Drupal is a registered trademark of Dries Buytaert.