Conditional SSI

admin

Administrator
Staff member
I'm a newbie here, and that will probably be obvious... Forgive me if this isn't the correct forum for this.<br />
<br />
I use SSI to include contents in a vertical menu bar. I want to make this menu content collapsible / expandable. I have main topics, and sub topics. The main topics are coded in the included bar, the sub topics (only a single level of sub topics) are separate included pages. I want to collapse or expand based on whether or not to include the sub topic. Here is what I hope to accomplish:<br />
<br />
+ - Topic Name<br />
Included (expanded) page sub topic<br />
<br />
+ - Topic Name<br />
<br />
Note on the second example the subtopic is not included - thus the topic is collapsed.<br />
<br />
I want to incorporate a click event to accomplish this. Click the + to expand, and click the - to collapse. I'm thinking the only way this will work is to set a variable based on the symbol clicked, clear the variable associated with the symbol not clicked, and reload the page, so the variable can be read and the appropriate conditional SSI statement(s) used. <br />
<br />
Does this make sense?<br />
<br />
How do I accomplish this? I can't find any way using SSI to evaluate a user action. A javascript? If so, do any examples come to mind?<br />
<br />
There's obviously other ways to accomplish a collapsible menu, and I'm not opposed to using another method. But I do have this idea in my head ...<!--content-->Rick Bull's site had this type of navigation on it, but for some reason I'm not getting his site to come up. Mind you it's been ages since I've been to his site and it could have been taken down. I also know some other well known web designer does this, but I'm drawing blanks on who. Anyway, the way to do it is by using JavaScript and not SSI. When the user hovers/clicks over/on the topic name the script changes the visibility of the sub topics and it pushes down the rest of the menu topics. The user can then click on the menu topic to down size that part of the menu.<!--content-->Here's a link to Rick's site: <!-- m --><a class="postlink" href="http://www.rickbull.com/">http://www.rickbull.com/</a><!-- m --><!--content-->Yes, I bet you were trying to get the .co.uk which he left for obvious reasons when he had arguments with the hosts, he changed a few month back?He is now into Linux.<!--content-->
 
Back
Top