menu breaks

Expanding / Collapsing, search engine friendly, Section menu.
Post Reply
commsbuyer
Posts: 1
Joined: Wed Feb 24, 2010 12:09 pm

menu breaks

Post by commsbuyer »

Have got collapso 1.16 installed and has been working spot on for some time, however in an effort to compartmentalise the menu, I have edited the collapso menu code with the following, essentially when a section's custom variable equals a specified number, it inserts a <br /> and a section title. This additional code sits at line 88 and has been working fine for some time, however the first lot of section links expand and stay expanded, however any of the sections beneath do not stay opened.

I can guarantee that my 'bodge' of code is causing the problems and wondered if anyone had any clues to get it behaving correctly, or any other option to split the menu into sections?

Code: Select all

// 3 lines below added to break up menu after a specific top level section
         <actinic:block if="%3cactinic%3avariable%20name%3d%22CollapsoMenuOrder%22%20%2f%3e%20%3d%3d%201" >
         echo "<br/><u>Structured Cabling</u><br/>";
         </actinic:block>
         <actinic:block if="%3cactinic%3avariable%20name%3d%22CollapsoMenuOrder%22%20%2f%3e%20%3d%3d%202" >
	      echo "<br/><u>Fibre Optic</u><br/>";
         </actinic:block>
         <actinic:block if="%3cactinic%3avariable%20name%3d%22CollapsoMenuOrder%22%20%2f%3e%20%3d%3d%203" >
         echo "<br/><u>Racks & Accessories</u><br/>";
         </actinic:block>
         <actinic:block if="%3cactinic%3avariable%20name%3d%22CollapsoMenuOrder%22%20%2f%3e%20%3d%3d%204" >
         echo "<br/><u>Cable Management</u><br/>";
         </actinic:block>
         <actinic:block if="%3cactinic%3avariable%20name%3d%22CollapsoMenuOrder%22%20%2f%3e%20%3d%3d%205" >
         echo "<br/><u>Electrical</u><br/>";
         </actinic:block>
         <actinic:block if="%3cactinic%3avariable%20name%3d%22CollapsoMenuOrder%22%20%2f%3e%20%3d%3d%206" >
         echo "<br/><u>Telecoms</u><br/>";
         </actinic:block>
         <actinic:block if="%3cactinic%3avariable%20name%3d%22CollapsoMenuOrder%22%20%2f%3e%20%3d%3d%207" >
         echo "<br/>";
         </actinic:block>
Thanks in advance,
Richard

http://www.commsbuyer.com
norman
Site Admin
Posts: 1252
Joined: Sat Feb 07, 2004 9:55 pm

Re: menu breaks

Post by norman »

The code in Collapso is semi-recursive and is a nightmare to alter. It's best left alone unless you clearly understand how it's working. It take me ages to work it out each time I revisit it and I wrote it!

I can look into doing this as a commision but expect a bill of hundreds of pounds. It might be more cost effective to switch to another menu that's easier to alter.

The only positive suggestion I can give would be to test for the specific Section Name, and if found, add additional HTML to that name that outputs what you want.
Norman
Post Reply