When taxonomy_dhtml displays its categories overview page of all vocabularies and terms, each term is an expandable/collapsible entry (followed by a parenthetical total for that term) that upon expanding will then list each node's title for click/accessing.

Is it possible to eliminate the expandable/collapsible aspect and thus, when clicking the term you are presented with all nodes in full for that term? Out of curiosity I tried renaming menuExpandable3.js and indeed I got what I'm referring to. Each term is preceded by the square.gif. If the visitor clicks the respective term, they receive all of the nodes for that term collected together instead of an expanded menu opening that lists each node by title. Thus click, say, Software, and you get all nodes written about software (that include the term).

So that accomplished it but Drupal reports a file not found error in the log because it's indeed looking for the menuExpandable3.js file. So I then tried emptying the contents of menuExpandable3.js and while I no longer get the not found error, I do get browsers (such as IE) reporting a javascript error "Object expected."

So my question is, is there something I can do, perhaps within the menuExpandable3.js file, to turn off the expandable menu aspect?

I may regret that down the road when I have dozens+ nodes for each term and Drupal is presenting all such nodes at once per term, but I can change it back if that becomes an issue. I rather like the ability at this time for the visitor to be presented with all respective nodes for reading when clicking the term rather than expanding to a list of each node's title for clicking. They instead get a page that starts with the name of the term followed by each node's text for that term.

Thanks.

Comments

drupal4me’s picture

There is a line you can comment out in the module that will prevent the expanding menus. I'll let you know, I think it's the line pointing to the .js file. I have tinkered with creating a "All" choice when the vocab menu expands similar to what you are referring to so that one can have either a single node to visit per clicking the node title in the expanded listing, or one can have all nodes to read per that vocab by clicking "All". But it depends a lot on you content and how you have it all laid out because if you have lots of sublevels within a vocab, an "All" can be pointless so I've not spent any amount of time with that.

That aside, for what it's worth, I have noticed the Javascript error message within Internet Explorer and Drupal 4.7 even without altering taxonomy_dhtml in any way, plus on a completely vanilla installation of 4.7 with nothing added except taxonomy_dhtml. I have also noticed the Javascript error message via numerous 4.7 sites using taxonomy_dhtml (assuming, of course, one has their Internet Explorer set to report Javascript errors).

I don't know what actually causes the error message. What I have noticed different with taxonomy_dhtml between my Drupal 4.6 and 4.7 test sites is that at the 4.6 site when I go to the taxonomy_dhtml overview page, and view source, there is an onload entry in "body", which looks something like this:

<body onload="initializeMenu('menu_1', 'actuator1'); initializeMenu('menu_2', 'actuator2'); initializeMenu('menu_3', 'actuator3'); initializeMenu('menu_4', 'actuator4'); initializeMenu('menu_5', 'actuator5'); initializeMenu('menu_6', 'actuator6'); initializeMenu('menu_7', 'actuator7'); initializeMenu('menu_8', 'actuator8'); initializeMenu('menu_9', 'actuator9'); initializeMenu('menu_10', 'actuator10'>

But when I go to the taxonomy_dhtml overview page in my Drupal 4.7, there is no onload at all, there is simply

<body>

So I don't know if there has been a change in the programming of taxonomy_dhtml and that there should no longer be onload, or if something is amiss and because I'm not experiencing a body onload entry at the taxonomy_dhtml overview page, Internet Explorer is reporting the Javascript error. Does seem plausible that that would be why the Javascript error message is occurring. I don't think there's a performance issue, however, because everything still seems to work fine on the overview page, vocab listings expand and collapse, etc., and the error is only being reported by IE, not by any of the other browsers I've tried, so I don't know.