The solution described in OldHowToMakeContentsExpandable has some drawbacks:

With the new script these weaknesses are solved:


There is currently no demo version available because of lack of webspace.

Local demo

The local demo is turned off at the moment.

The javascript (with encoding fixed and comment added) has been installed as ; aqtree3clickable.css has been added to ; script src="aqtree3clickable.js" type="text/javascript" (enclosed in '< ... />') has been added to the head section of ; and the images are installed as , , .

For Internet Explorer compatibility the above code should rather be enclosed in '< ... >< /scr ipt >'. (See the blank pages comment below).


To install do the following:


to show contents eg in a sidebar --simon, Thu, 12 May 2005 15:30:41 -0700 reply
With the current code, you could do:

 <div tal:replace="here/contents" />

somewhere in the wikipage template, or with less junk, but also missing the singleton pages:

 <div tal:replace="structure python:here.renderNesting(here.wikiOutline().nesting())" />

speed --simon, Thu, 12 May 2005 16:32:10 -0700 reply
We just tried this for a full-contents sidebar at (170 pages) and it was a bit slow. A pity!

speed --Benedikt, Fri, 13 May 2005 01:23:31 -0700 reply
I downloaded the file aqtree3clickable.js from . It is the old version of the script, not the new version, which - like I described - is much faster because of lazy processing. I believe that replacing the script should make a big difference. If you try it out, tell me your results! Thanks, Benedikt

speed --Simon Michael, Fri, 13 May 2005 07:29:35 -0700 reply
Cool - I'd like to know as well.

Trying outside of zWiki -- Thu, 19 May 2005 03:20:53 -0700 reply
Gday there, I've tried the original aqtree3clickable method in my own sites (nothing to do with zWikis) and I too have found it unacceptable to IE. I read your improvements with interest and applied them to my site, but it does not seem to work at all. Is the javascript specific only to your python-system? Thanks for any help, much appreciated. ...Darryl (See and the css is at and the javascript is at ) Thanks :)

Trying outside of zWiki -- Thu, 19 May 2005 04:02:03 -0700 reply
Hi Darryl. I just discovered a flaw in the script and corrected it: the line:

  (ul.parentNode.nodeName != small) 

should read:

  (ul.parentNode.nodeName != 'small')

This has probably been the cause, why the script didn't work on your site. In your case the easiest thing to do is to delete the line, since it is zwiki-specific. In general the script does not depend on the python code and should be reusable standalone. Here is an example: .

Brilliant -- Thu, 19 May 2005 05:41:45 -0700 reply
THANK YOU so much! yes, that was it. I'm so happy, I can go to bed now. You've made my day!

Not bedtime yet :( -- Thu, 19 May 2005 05:44:05 -0700 reply
Well, I was stoked to see the menus visually correct, but now I am unable to actually toggle them. They just stay closed. I'll go back and check that I didn't touch anything else in the code.

Thanks for that test too -- Thu, 19 May 2005 05:48:51 -0700 reply
I didn't realise the test was of my code, thanks for doing that. I have found that the bullet itself is operable, but not the anchor text, so I'll look into that area. I'm using PC and Mac with same issue (PC IE 6.028 and Firefox 1.0.2, and the Mac Safari 1.3 and Firefox 1.0.2).

Uncertain -- Thu, 19 May 2005 06:02:25 -0700 reply
OK, when I insert the fixed code(ul.parentNode.nodeName != small) I get the effects I mentioned above. But when I comment-out or delete the line altogether as suggested, it reverts to the original problem where it is unstyled and inoperable. I don't want to take any of your time, if you may spot anything else it is much appreciated.

p.s. -- Thu, 19 May 2005 14:50:17 -0700 reply
while it's not visible in the note above, I actually had the single quotation marks around the word small.

p.s. --Benedikt, Thu, 19 May 2005 15:36:29 -0700 reply
Hi Darryl, does the test site work? It works for me in Firefox and Opera. Don't have the chance to test IE at the moment, but I did so some months ago, and it worked fine. Maybe some more apostrophes got lost somewhere.

p.s. --Benedikt, Thu, 19 May 2005 15:39:17 -0700 reply
I just tried out your site, and it works fine for me. So I guess I have to try again with IE to get rid of the bug.

Thx Benedikt -- Fri, 20 May 2005 06:45:04 -0700 reply
Thanks again Benedikt, it seems to work only by clicking the bullet icon itself, but not from the text anchor. I've used Firefox and IE Win 6.028, and on a Mac I've used Safari 1.3, Opera 6.03, Netscape 7.1, and even IE5.2 Mac. None of them are working. I notice that something is definitely happening, when I click the anchor text, it cycles through something according to the browser status bars, but nothing opens. Perhaps it's firing off the scripts but not actually opening for whatever reason. Funny that even my Firefox 1.02 on the PC still doesn't work. Could it be due to the use of the hash symbol in every link? I've tried other stuff but doesn't help. I thought perhaps they may have to be true links. I'm not a javascripting person, so I'm lost with it. I want this to work though so I'll invite anyone else interested to have a look too. Thanks Benedikt..

Test site -- Fri, 20 May 2005 06:48:09 -0700 reply
Also, the test site you have doesn't toggle open either. It sort of tries, it just shakes and squirms a bit, but doesn't open. That's when using the text anchor. If I click directly on the graphic, it works fine. But if I click the graphic, toggling open a level, then click the word in the next tree level, it doesn't open, just closes the lot.

Message-ID: <> --Fri, 20 May 2005 08:36:59 -0700 reply
Hi Darryl, I think we had a little communication problem up until now. The links aren't supposed to do anything but follow the links that are given in the source. On the demonstration page, those links were all empty, and that's why the page was reloaded when you followed those links. But the symbols should work. Clicking on a plus should expand the tree, while clicking on a minus should collaps it - that's everything the script does. Benedikt

Thanks for that -- Fri, 20 May 2005 14:49:57 -0700 reply
Oh, I see. The original one from the a3clickable guys allows the opening from the anchor words, so I figured the improved version would too, see my example (with the old code) at It didn't work that well in IE so I figured yours must be better than it. Do you see that it still toggles from the anchor word rather han the button itself. It is better for usability, rather than having to click such a small button. Perhaps you can integrate the method back into yours one day. All the best, and much appreciated for your help Benedikt, you have been very generous.

Thanks for that --Benedikt, Sat, 21 May 2005 01:10:28 -0700 reply
You're right ... I didn't even remember that change, although it was just a few months ago. I could reintegrate it into the new script, but for zwiki it doesn't make sense, since all list items (also super-categories) point at a page. It took me a while to understand:-).

Not going mad -- Sat, 21 May 2005 18:29:04 -0700 reply
Thanks for letting me know that, I thought for a while I was going a bit silly...much appreciated. Love to hear from you one day if you get it reintegrated, but I understand that you don't need to for zWiki. All the best.

some problem --simon, Sun, 22 May 2005 17:04:16 -0700 reply
I've installed the latest script and styles in this wiki. In firefox 1.0.2 on linux I go to contents and see a + image only for the first level items. Clicking on those reveals and changes the other images, but the items don't collapse/expand.

some problem --Benedikt, Sun, 22 May 2005 23:16:26 -0700 reply
At the moment I cannot reproduce the problem, because the link to the Javascript file in the head of the contents page seems to be missing. Your description of the problem lets me believe, that the Javascript was working fine, but the css-rules couldn't be found, or for some reason weren't applied. The css-rules expand and collapse the sub-trees, while the Javascript changes the images. At the moment the right rules can be found in, and also the link in the head von contents to the stylesheet exists... I'm lost. I will try to reproduce it in my own ZWiki soon.

some problem --Benedikt, Sun, 22 May 2005 23:50:07 -0700 reply
Got the problem! Some rules in are outdated (the ones at the bottom from the original version of aq3treeclickable.css). They need to be replaced by the ones found in my script at . This should solve the problem.

some problem --simon, Wed, 25 May 2005 10:16:54 -0700 reply
I can't reproduce your fix. Could you look at my notes above under Local demo ? I've tried to reproduce your working setup exactly. Even using your exact .js and removing everything else from the stylesheet doesn't help. I'm using firefox 1.0.2 and can't see the bullet images.

some problem --simon, Wed, 25 May 2005 13:16:30 -0700 reply
Ah! Thank you, losing the javascript link from the header in wikipage template was my problem. It's working here now.

It hides the page name when a page has parents, I'll have to do something about that.

I wonder why the two longer page names on ZWiki, eg, wrap to the next line.

some problem --simon, Wed, 25 May 2005 13:28:43 -0700 reply
I don't think the span.pseudo_link style is needed.

some problem -- Wed, 25 May 2005 13:30:31 -0700 reply
I had the problem with the wrapping of the longer page names already. It is caused by the table around the unordered list in the subtopics panel. Replacing the tag:



  '<table width="90%">

should do it. In the stylsheet this could be achieved by the following rule:

  table.subtopicspanel { width: 90%; }

At the moment there is the following similar rule, which does not work, because the class subtopicspanel belongs to the table itself:

  .subtopicspanel table { width:90%; }

some problem -- Wed, 25 May 2005 13:32:37 -0700 reply
You're right, I think we can leave out the span.pseudo_link rule.

some problem -- Wed, 25 May 2005 14:38:16 -0700 reply
The problem with the hidden page names can be solved by replacing:

   (ul.parentNode.nodeName != 'small'))

in aqtree3clickable.js by:

   (ul.parentNode.nodeName != 'SMALL'))


some problem --Simon Michael, Wed, 25 May 2005 15:57:07 -0700 reply
Gosh.. I don't know how you did that, but it worked. :)

width fixed --Simon Michael, Thu, 26 May 2005 08:24:00 -0700 reply
Ohh.. thanks!

blank pages in IE -- Sun, 29 May 2005 11:52:03 -0700 reply
I've disabled this again as it seems to make all pages blank in IE 6.0.

blank pages in IE --Benedikt, Fri, 17 Jun 2005 14:19:26 -0700 reply
I believe I had that problem once as well. In my case the reason was that I didn't have an explicit closing tag for the script tag in the head. IE didn't like that. After inserting the explicit closing tag it worked fine on my installation.

blank pages in IE --Benedikt, Fri, 17 Jun 2005 14:37:05 -0700 reply
In fact I just tested it with links - I don't have IE at the moment - and it exhibits the same problem. When parsing the short form for the script tag in the html-head it displays blank pages, when confronted with explicit opening and closing tags everything works fine. I am quite sure this is the problem.

Works with konqueror --Benedikt, Tue, 05 Jul 2005 00:53:07 -0700 reply
I just installed a new version of konqueror that comes with KDE 3.4.1, and was pleased to note that it works with the script. Before I had KDE 3.0.5 and it only appeared static.

Where? -- Mon, 18 Jul 2005 02:45:03 -0700 reply
Maybe I'm missing something. But I can't find a working demoversion of this script.

Where? --Benedikt, Mon, 18 Jul 2005 05:01:43 -0700 reply
No, you weren't missing anything. Seems like my university (or me) has problems with the .htaccess files. I updated the links above, now they should work. Here's the link to the workin example: .

Where? --simon, Sat, 10 Sep 2005 13:48:31 -0700 reply
The demo link doesn't respond for me.

Where again? -- Wed, 07 Dec 2005 13:41:33 -0800 reply
Is there actually someplace where one can get a copy of the aq3treeclickable.js file? I can't find a link that works.

Where again? --Benedikt, Thu, 08 Dec 2005 00:45:31 -0800 reply
I uploaded it to: . Unfortunately, the appropriate rules somehow got lost in the Zwiki stylesheet. Therefore it is not going to work for now. If it is really important for you, I'll take some time to recode it.

where again -- Thu, 08 Dec 2005 13:22:20 -0800 reply
My users have asked for this capability, but I can't say it is "really important", and in any case I'm sure you have more urgent things to do. If you ever do put together the correct rules again, I'd love to have them.

more info? --PP, Mon, 06 Mar 2006 07:26:32 -0800 reply
I believe this would be a great feature. Could you please give me more info on what changes the ZWiki stylesheet would require for this to work?

more info? --Benedikt, Sat, 11 Mar 2006 05:38:57 -0800 reply
I put the rules in ExpandableStylesheet. They worked with ZWiki 0.33 . They are untested with newer versions of ZWiki. Make sure you read the note about blank pages in Internet Explorer above.

Re: more info? --PP, Fri, 17 Mar 2006 00:58:44 -0800 reply
Thanks for your response... I am not very familiar with Zope/Plone Page Templates. Could you please help me with the steps required to include the aqtree3clickable.js script within the zwiki_plone/ ? We have a Zope/Plone/ZWiki setup..

styles updated --simon, Sun, 01 Oct 2006 20:36:03 -0700 reply
In zwiki 0.57 I renamed the aqtree3clickable class to "expandable", and styles have been cleaned up. This javascript/how-to will also need an update.