Files in different directories, keep multiple menu copies?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
gummyworms
Beginner
Beginner
Posts: 6
Joined: Wed Jan 12, 2005 2:48 am

Files in different directories, keep multiple menu copies?

Post by gummyworms »

Hello,

I was wondering how you guys deal with having your files in different directories.

I want to keep the paths relative, so that links work online and offline, but since I have different directories, does this mean that I have to have a seperate menu_data.js for each different directory level so that I can have menus work?

Thanks,
Shawn
gummyworms
Beginner
Beginner
Posts: 6
Joined: Wed Jan 12, 2005 2:48 am

Post by gummyworms »

Ahhh...I think I found the answer using an extra "/"

/people/page.php

instead of

people/page.php

which brings me to another question. I don't have the directory I'm working in at the very root of the server, because there are many other files on the server. Is there a way to make the server think its already at the root without actually setting a new /htdoc location? (I'm using apache btw)
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

I suppose you could try the BASE tag in the head of your documents, to define a base url. Then your relative urls (e.g., people/page.php rather than /people/page.php) would start from the base. For example, in the head section:

Code: Select all

<base href="http://websites.milonic.com/mysite.com/site1/root/">
Then a link with an href="people/page.php" should actually resolve to http://www.mysite.com/site1/root/people/page.php (at lease if I remember correctly!)

Only thing is... I don't know if urls specified in the Milonic items would also use the BASE url. Never tried it. If you try it, I'd be interested to know what happens.

Cheers,

Kevin
Post Reply