Can you link to/back from pages in different folders?

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
#psyickphuk
Beginner
Beginner
Posts: 1
Joined: Mon Feb 17, 2003 2:09 pm

Can you link to/back from pages in different folders?

Post by #psyickphuk »

Using the same menu_array.js?

I ask because I have all my content pages in a subfolder, with my index page in the root (obviously) - I'm having problems because the relative paths change depend on whether the menu_array is loaded into the index page or my content pages. I don't want to use absolute URLs in the form of http://www.mydomain.com/Content/Page1.asp etc because I have two different URLs pointing to the same webspace.

Is there any way around this short of using a different menu_array for my index page?

(I notice that the milonic site has a redirect to /menu/ where all the pages are, mayybe not then)
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi,

I use relative paths all the time. Sounds like you're making your paths relative to the current page's locaiton, rather than relative to the root of the site or to the server. Are you using a "/" on the front of the path name?

Also, if nothing else, you could define some "root path" string variables and prepend them to the menu items' URLs, like so:

Code: Select all

p1 = "http:/www.mydomain.com/whatever/"
and in the menu item...

Code: Select all

,"Item Text",p1+"subpath/file.html",,,1
If a base path ever needs to change, it's easy; just change the appropriate variable, rather than editing all of the menu entries.

Hope that helps,

Kevin
Post Reply