only one selection as an option

jaron - September 30, 2009 - 16:39
Project:Hierarchical Select
Version:6.x-3.x-dev
Component:Code - Taxonomy Views
Category:support request
Priority:normal
Assigned:Wim Leers
Status:postponed (maintainer needs more info)
Description

hi,

i was wondering if it is possible (and if so how) to use hierarchical select to only give one taxonomy selection. i have a scenario where i have child terms each with multiple parent terms. i'd like to use the hierarchical select taxonomy views filter but only for the parent terms in some instances. there are other instances where i will have a very similar view where the option for child terms is required. the setup with child terms is quite simple (though i am sometimes getting an odd issue where an error pops up -
warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/html/DDO/sites/all/modules/views/includes/handlers.inc on line 590.
- and then the hierarchical select shows all 5 instances of the child term as optional dropdowns following a single parent term. it's odd, but happens rarely.

is there anyway to limit the child terms out for certain views?

#1

Wim Leers - September 30, 2009 - 19:19
Assigned to:Anonymous» Wim Leers
Status:active» postponed (maintainer needs more info)

You can do that, but you'll have to write some code. In fact, you'll have to write a new implementation of the HS API, based on the implementation for Taxonomy. Probably that's too much work. If you're willing to sponsor it, I could write it for you though.

The error you're referring to is probably related to this issue: #588612: Error when Hierarchical Select in Views with exposed filters, so let's keep that there.

#2

jaron - October 1, 2009 - 01:38

i wouldn't know how to write the new implementation of it (not much of a programmer). what's involved in sponsoring it? would i need to know a lot about php (see last comment). i'm not adverse to it, just want to make sure i could do a good job with it.

#3

Wim Leers - October 31, 2009 - 01:05

On the day you made that comment, I committed the port of the HS Content Taxonomy module. That implementation of the HS API does have a 'depth' parameter, which supports exactly what you need.

However, HS Content Taxonomy Views has not yet been ported. And that 'depth' setting is only available through the Content Taxonomy Field configuration UI (and is then transferred automatically to the HS configuration).
So, in order to allow for you to configure the depth for each HS Taxonomy exposed filter, we would need to do the following:
- transfer the 'depth' functionality from HS Content Taxonomy to HS Taxonomy
- make this configurable in the UI of HS Taxonomy Views

 
 

Drupal is a registered trademark of Dries Buytaert.