Closed (fixed)
Project:
Hierarchical Select
Version:
6.x-3.x-dev
Component:
Code - Taxonomy Views
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
24 Oct 2009 at 10:47 UTC
Updated:
21 Feb 2011 at 10:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
wim leersSounds like it makes sense. Although I don't know how the "Taxonomy: Term ID (with depth)" filter actually works.
Patches are welcome :) Postponed until somebody posts a patch or sponsors this feature.
Comment #2
jrao commentedOk, I think a patch should be easy, although there could be a code duplication issue, since "Taxonomy: Term ID (with depth)" filter is also a subclass of views_handler_filter_term_node_tid.
I think I found an alternative to deal with the situation though: turn on save lineage on my vocabulary, this saves parent term to node and allows a filter on the parent term to display child term's node.
Comment #3
wim leersCode duplication: we can create a base class of which we can derive multiple times for both implementation, to share code.
Glad you've find another way though :)
Comment #4
adriancruz commentedsubscribing....
Comment #5
adriancruz commentedany patch? save term lineage doesn't work for me. I used HS as exposed filter in my archive, (no results found) It need to choose a term from the deepest level, there's any other way to choose only the parent term? then show all pages related to that parent term? there's any patch? I thinks I need term ID with depth to do this..
Thanks!
Comment #6
wim leersSave term lineage does work. But you must enable "save lineage" for both the vocabulary on the node form *and* on the exposed filter. Otherwise it of course cannot work.
This requested patch could be used for special "save lineage" setups, but "save lineage" in se (see the first sentence) should work.
Comment #7
adriancruz commentedHi Wim Leers,
I'm new to drupal and I really want to implement HS in my archive, can you tell me how to enable "save lineage" so my archive can work properly. I'm using HS 6.x-3.x-dev, and Drupal 6.13?
Thanks Wim Leers!
Comment #8
wim leersPlease read the README.
Comment #9
drenton commentedFor a workaround, I created a taxonomy term id with depth exposed filter and a taxonomy term id hierarchical select exposed filter. Then in hook_form_alter I copied the hierarchical select one over to the depth one and unset the hierarchical select filter. Seems to work fine.
Comment #10
wim leersMarking as postponed.
Comment #11
fonant commentedThe "save lineage" option works nicely for new nodes, with the possible disadvantage of adding a whole load of terms for complex items. But I can't see an easy way to retrospectively apply parent terms to all nodes that already exist...
Comment #12
smartinm commentedAttached a patch to allow "Taxonomy: Term ID (with depth)" filters to be used with Hierarchical Select.
It also fixes a bug in the name of the implementation of the hook hook_views_data_alter.
Comment #13
palyan commentedThanks a lot, smartinm. Your patch is really work!
Comment #14
laroccadahouse commentedcan we add the option to limit the terms to the selected parent items for exposed filters?
Comment #15
udane commentedThank for the patch. I tried it but it didn't work for me, that's the result:
(Stripping trailing CRs from patch.)
patching file hs_taxonomy_views.module
Hunk #1 FAILED at 180.
Hunk #2 FAILED at 187.
Hunk #3 FAILED at 238.
Hunk #4 FAILED at 560.
4 out of 4 hunks FAILED -- saving rejects to file hs_taxonomy_views.module.rej
(Stripping trailing CRs from patch.)
patching file hs_taxonomy_views_handler_filter_term_node_tid_depth.inc
Can you help me please?
Thanks.
Comment #16
smartinm commented@udane, what exact version are you patching against?
Please apply the patch to the latest dev release (I think this patch works for 6.x-3.6 release too).
Read this for more info: http://drupal.org/patch/apply
Comment #17
udane commentedI am using 6.x-3.6
Any solution?
Thanks
Comment #18
udane commentedI tried again and this is the result:
$ sudo patch -p0 < ../hierarchical_select-613428.patch
(Stripping trailing CRs from patch.)
patching file modules/hs_taxonomy_views.module
(Stripping trailing CRs from patch.)
patching file modules/hs_taxonomy_views_handler_filter_term_node_tid_depth.inc
But I can't see the "hierarchical select" option in "Display exposed filter as: "
Comment #19
smartinm commented@udane Add or edit a view, add "Taxonmy: Term ID (with depth)" Filter and select "Hierarchical Select" on Selection type.
Comment #20
chuckbar77 commentedsubscribing
Comment #21
wim leersPatch applies cleanly and looks good. Committed. Thanks, smartinm! :)
http://drupal.org/cvs?commit=495026
Comment #22
smartinm commentedHi Wim Leers,
I think you forgot to commit the
modules/hs_taxonomy_views_handler_filter_term_node_tid_depth.incnew file to CVS.Thanks.
Comment #23
wim leersYou're absolutely right. Thanks for letting me know. :)
Fixed: http://drupal.org/cvs?commit=496062.