Active
Project:
Taxonomy context
Version:
master
Component:
User interface
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
27 Feb 2007 at 22:36 UTC
Updated:
20 Mar 2008 at 14:28 UTC
Is there any way to implement the functionality of DHTML Menu in this module? I'm setting up a rather large taxonomy listing, and would like to reduce the number of page loads as much as possible.
For reference, DHTML Menu is available at http://www.drupal.org/project/dhtml_menu/
Thanks!
Comments
Comment #1
nedjoTry inistalling Javascript Tools, enable the activemenu module, enable a taxononomy context block that includes nested terms, and you'll get an AJAX-expanding block. This approach could be adapted to other places in taxonomy context. If you develop a clear spec - details of what you'd want to see - I'll look at it, though I don't know if I'll find time to impement it.
Comment #2
StenBH commentedI'm also interested in this issue. I would find it most appealing if the menu was accessible in the core menu module instead of as a separate block. This is the approach of the taxonomy_menu module. As a result the taxonomy_menu works with dhtml_menu. Would this design be acceptable from other perspectives?
Comment #3
bardkerbie commentedThis sort of works. If i install HEAD and JSTools, I can get parent categories to display child categories in a DHTML list. However, I cannot get child nodes to display unless I actively click on the category. I'll try to do a little debugging, but I feel like I'm in over my head.
Here's the error message:
Thoughts?
Comment #4
nedjoAre you using Internet Explorer? If so, it may be this issue:
http://drupal.org/node/140620
Comment #5
bardkerbie commentedI'm using Firefox, though it appears to be a cross-platform issue. I'm going to try applying the JSTools patch listed to see if it fixes the issue; I'll let you know what happens.
Comment #6
bardkerbie commentedStill no worky. However, I did a little poking about (I love FireBug) and discovered more specific symptoms.
Let's say I have a vocabulary with a few terms. The first term has two sub-terms, and each sub-term has two nodes apiece. This Taxonomy is displayed in a block:
Term 1
- Sub-Term A
- - Node 1
- - Node 2
- Sub-Term B
- - Node 3
- - Node 4
Term 2
When I click on Term 1, the browser POSTs
taxonomy/term/1the server returns
and Sub-Term A and Sub-Term B are displayed.
When I click on Sub-Term A, the browser POSTs
taxonomy/term/8but the server returns
and all of the related JavaScript errors out.
Thoughts?
Comment #7
nedjoThanks for this valuable debugging info. This does appear to be a bug in taxonomy context. I'll try to track it down when I get a chance. Meantime, help welcome.
Comment #8
bardkerbie commentedI think the problem might lie in the taxonomy_context_menu_tree() function. My thought is that the first time Activemenu makes a hook_activemenu call for the Taxonomy Context block, everything gets parsed properly. However, on the second call (for sub-terms and children), something is making taxonomy_context_menu_tree() think that it doesn't have a proper context, and therefore return "content: null".
Am I just making conjecture here, or does this make sense? :)
Comment #9
bardkerbie commentedComment #10
bardkerbie commentedI found it.
In the taxonomy_context_menu_tree() function,
returns the tree proper when $tid = FALSE, but returns NULL for children when $tid = TRUE.
When we go to assemble the menu, and evaluate
if ($terms), it evaluates to FALSE and NULL is returned as the function's output. Hence the error.My question is this: Why does taxonomy_get_children() puke when run by the activemenu code, but work properly when run the old-fashioned way?
Comment #11
bardkerbie commentedAny thoughts? I've tried slogging though this without any luck.
Comment #12
dami commentedSorry to interrupt, but I installed JStools and Taxonomy Context. Enabled a context block, however the block is not ajax-expandable like DHTML menu, it still needs page reload on every click...Did I miss anything? thanks.
Comment #13
felixsmile commentedInteresting issue - subscribing
Comment #14
nedjoI can't reproduce the issue described here. The menus work for me. So I'm not able to troubleshoot.
@dami, have you enabled activemenu module? It's required for this behavior.
Comment #15
felixsmile commentedUsing taxonomy context and activemenu (both HEAD versions, otherwise, I don't get the js functionality in the taxonomy context block), I get an error for empty categories: an http error 404 occurrred /?q=activemenu/tc
Otherwise, I would also think it would be great to have an option that would integrate the context menu inside the navigation tree (well, it wouldn't really be context sensitive anymore, but still great...). I posted a feature request here: http://drupal.org/node/155938.
Have a nice day,
Felix.
Comment #16
summit commentedVery interested in DHTML menu functionality in taxonomy context.
Any progress in this field?
greetings,
Martijn
Comment #17
summit commentedOff course the AJAX functionality in the named modules that speeds up the loading time of the categories.
Greetings,
Martijn