Page 1 of 1

Heading to collapse and show tope level section

Posted: Fri Sep 26, 2008 8:33 pm
by bangers
Hi Norman,
Trying to edit collapso for a job I have been given.
What the customer wants is for the heading "shop" to be the only collapsable link to revel the the top level section list. I realise I need to customise the Collapso-5 Menu layout to force the "SHOP" link to appear above the top level list.

Any tips on how to hard code this into the layout so it collapses and section list appears below.

I have set the level depth to be 1 only.

regards
bangers

Re: Heading to collapse and show tope level section

Posted: Sat Sep 27, 2008 9:50 am
by norman
It would be very difficult to tweak Collapso to have a single start item. Probably cost an order of magnitude over the Collapso price.

What you could do, however, is to start the page with the menu inside a hidden div and show / hide it when a link is clicked.

To do this replace the line (in your Overall Layout)

Code: Select all

			<actinic:variable name="Collapso-5 Dynamic Menu" />
with

Code: Select all

			<style>
			.CollapsoHidden {display:none; visibility:hidden;}
			.CollapsoVisible {display:block; visibility:visible;}
			</style>
         <a href="#" onclick="var cm=document.getElementById('cmenu');if (cm.className == 'CollapsoHidden'){cm.className='CollapsoVisible';} else {cm.className='CollapsoHidden';}return false;" >Shop</a>
         <div id="cmenu" class="CollapsoHidden">
         <actinic:variable name="Collapso-5 Dynamic Menu" />
         </div>
You can replace the word Shop with an image if required.

UPDATE. I reworked the code above to be a bit cleaner. It now switches classnames rather than directly fiddling with the style.

Re: Heading to collapse and show tope level section

Posted: Sat Sep 27, 2008 4:43 pm
by bangers
Cheers Norman,
Thought that might be the case; with only 1 section level depth I may as well use the TopLevelSectionList instead of collapso which would seem to over complicate it for their need, I always thought that was the case.

Thanks for getting back so quickly. (you had a license bought for it in any case so I guess they can use it on another project).

Regards
bangers

Re: Heading to collapse and show tope level section

Posted: Sat Sep 27, 2008 9:43 pm
by norman
You could still use my tweak above with the Top level Section List. Simply put in it place of the

<actinic:variable name="Collapso-5 Dynamic Menu" />

line.

Re: Heading to collapse and show tope level section

Posted: Mon Sep 29, 2008 12:12 am
by bangers
Sure Norman,
Once you suggested to edit outside of the javascript it was the only way to go. I'm very familar with show hide layers so was happy to read you'd come up with a method I wanted to use anyway (your javascript was a bit neater than what I've tended to use mind you, so nice to see a method which didn't need more javascript in the head of the document). Thanks for the help, hope someone else find it useful.

Regards
Bangers