PDA

View Full Version : disabling top level links within nortree


leej
08-Sep-2003, 09:10 AM
hi everyone,
I have used a nortree menu system on my site to allow easy navigation for users however a probelm has arisen that I had not considered. Ideally I want users to be taken directly to my products however I realise that the menu is created from each html page that has been created on my site.

Does anybody know a way to disable the top level links of a nortree menu so that the user can only click on the product links.

please find below a link to the test site to further explain my problem.

http://trials.actinic.com/trials/trial2991

Any help would be appreciated.

NormanRouxel
08-Sep-2003, 10:04 AM
I wasn't going to investigate this as I'm feeling lazy but you'd done such a nice integration of the menu into your site that I woke up a bit.

Try this:-

in notree_menu_create.js in your Site1 folder, look for the line:-

eval('Menu' + base + i + '=new Array("' + SName


ADD the following line above it.

if ( thislevel == 1 ) LinkURL = ''; // disable link on top level



Best to copy and paste from the text above as that's a pair of single quotes there and you might type the wrong thing in if you eyeball it.

I've not tested this but it's easy to undo if it's wrong.

A side effect is that you'll lose your link to Audio Accessories as they have no sub-sections, just products. I'd create some sub-sections and move all the products there if I was you.

Norman

leej
08-Sep-2003, 11:58 AM
Norman,
I tried what you said but the code causes an error in building the menu. Have removed the line and menu now back to normal. Thanks for your suggestion.

NormanRouxel
08-Sep-2003, 12:40 PM
Told you I hadn't tested it. I missed some capitalisation. Sorry. Here's it again (and tested OK).


in nrotree_menu_create.js in your Site1 folder, look for the line:-

eval('Menu' + base + i + '=new Array("' + SName


ADD the following line above it.

if ( ThisLevel == 1 ) LinkURL = ''; // disable link on top level

Norman

leej
08-Sep-2003, 01:11 PM
Norman,
if I ever get the chance to meet you then remind me to buy you a very large shot or pint of whatever you want. =)

Thankyou very much for your help!

Lee

NormanRouxel
08-Sep-2003, 01:27 PM
Glad it worked. I'm at approx 36.40N, 27.34E at the moment so you'll need to be a good swimmer.

Norman