By helsinki on
How do I customize the site_map.module so that I can use javascript to open and close branches within the taxonomic tree? There are numerous javascripts available to create this from scratch, but nothing I have seen uses php to call the terms from a database. As site_map module does this, and adds rss feeds and number of nodes, it would make sense to customize this to include some dynamic elements that degrade to the plain list on older browsers of if Java is not installed.
I will donate €50 to the Drupal community if I can get this to work.
Comments
Are there really no
Are there really no suggestions for this?
Okay, still no takers on
Okay, still no takers on this one.
Well, this is the link for php and javascript for creating the php classes. It might be that this code could be modified to create a new module, or maybe just added to the site_map module. Either way, I would really like some advice about how to go about incorporating this functionality into my Drupal site.
Code can be downloaded from:
http://pear.php.net/package/HTML_TreeMenu
Follow up
In case anyone ever comes across this thread (nobody seems to have so far!), then I found out that shortly after site map was originally released, somebody added exactly the functionality I was looking for as an issue. It can be found here:
http://drupal.org/node/18261
The site map was then updated for 4.6 by someone who also used the same 'dynamic' map used in the previous patch. I downloaded and installed these (the 4.6 upgrade was just a hack of one file) and it is almost working...but still some issues. I don't know why, because the guy who did the hack said it was working perfectly in 4.6.
Just to test, I downloaded and installed Drupal 4.5 on my home server and added the 4.5 version of the module just to check, but this is showing exactly the same behaviour as in 4.6. Maybe there were changes that were made to the latest 4.5 after this module was originally put out. ? I'm guessing, but it's strange that it doesn't seem to work properly in 4.5 and 4.6.
Anyhow, here is also a description of what is happening. The full site map appears expanded without folders when all the functions are switched on (rss and nodes). When nodes is switched off, folders do appear, but still an expanded map. Clicking on the folder switches to the 'open' folder, but obviously the tree is totally expanded. I#ve tried this on small and large vocabularies and it's the same.
This functionality is fairly critical to my website project, so if anyone can help with this, please do.
www.wilba.org/sitemap
UPDATE:: Well, the truth is
UPDATE::
Well, the truth is that most of the functionality you are looking for is out there if you are patient enough to go looking for it. I have since discovered that taxonomy_dhtml does exactly what I have outlined. I had to modify it a little to get it to work with my theme and also set up 5 versions so that one could be devoted to each of my large vocabularies. But work it does, and dynamic it is. I've raised another issue elsewhere about problems when you click before it's fully loaded in IE, but I can live with that for now.
I had some issues with Opera not showing the plus and minus gifs, but just made a folder where it expected them to be and put them there. Some link is not interpreted properly by Opera.
Otherwise, see a working version here:
www.wilba.org/map/work
Page not found?
Your link doesn't work ...
The link I posted in the
The link I posted in the update is the most recent one and does work. If you still have problem, let me know. If you are on IE, you have to fully let the page load before trying to open the menu, otherwise it can hang. Pain, but for now, it does me.