Same menu_data.js with different positioning

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
andy_vdg
Beginner
Beginner
Posts: 3
Joined: Wed Aug 04, 2004 1:34 pm

Same menu_data.js with different positioning

Post by andy_vdg »

Does anyone know if it is possible to have the same menu_data.js just with different positioning for different pages?

I have a homepage that would need to have the navigation with:

Code: Select all

screenposition="top,center";
top="offset=197";
but it should be

Code: Select all

screenposition="top,center";
top="offset=15";
for all other pages.

I have solved it by just creating a new menu_data-index.js and loading that for my index.php with the different variables for the top offset. But now if I want to change anything in my navigation I have to change two files all the time. Is there a workaround for this in PHP or javascript? Like

Code: Select all

if filename is index.php {set top="offset=197"}; else {set top="offset=15"};
Here are the examples:
Index.php
Subpage with different positioning

Thanks
Andy
Post Reply