Problem with <!#include virtual .........

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Ok here is my deal.

I have 2 menus on my site. My links menu and my main navigation menu. Both are being pulled into my site using

and

1st one represents navigation menu, 2nd one represents the links menu. I did this so if any change is made, i can do it to 1 file.

Now, it works great for all the html files residing in my htdocs folder (where the index.html is located) now i only put navigation menu items in this folder. I created a separate folder, located inside the htdocs folder for cheat codes. This folder is called Cheats. It contains all files representing cheats per game.

Now, I include both those call commands into all my html documents, including the cheat files inside their folder. Now, if you go to gamecubecheats.net you can see how everything looks in proper order. If you go to the cheats menu, and then click a game, its a different story. First off, i had to individually include the 2 images (links and affiliates) and put them into the cheats folder because it seems like that command calling the menu wants to do it inside the cheats menu, and not from where i told it to. That is what i thought created menu's to be called using SSI would do, is i would save it as 1 file, make sure any images that went with it reside in the same folder, and then apply the line of code to all. Well, it isn't working properly for the cheats folder and i can't figure out why. If you look at my source, it probably won't help because those two lines of code i provided get turned into this

menu

because its calling another html file. What really confuses me is even though i am having the problems with the cheats pages, the text for the menu's still appear, but the background image doesn't. To add to this problem, while in one of the cheat pages, lets say Batman's Vengeance, if you highlight your mouse over CURRENT GAMES, it shows on teh status window

http://www.gamecubecheats.net/cheats/currentgames.html

when if you hover your mouse over the same CURRENT GAMES while on my index page (the gamecubecheats.net page)
it reads..

http://www.gamecubecheats.net/currentgames.html

Something is happening when the file is being called into the cheats folder, because the menu then wants to link with files within its own folder. Can't figure it out, especially when i am calling a specified made file.

Thanks, any help would be awesome

bryan

Brian Farkas's picture

They have: 1,015 posts

Joined: Apr 1999

Are all your links relative to your document root?
e.g. if an image is located in domain.com/images/image.gif, does your image call look like this: "images/image.gif" or like this: "/images/image.gif"? The second one should work correctly...

Perhaps if you posted the HTML code of the file giving you trouble that might help out a little.

Good luck,

Brian

jag5311's picture

They have: 202 posts

Joined: Jan 2002

So when you have this

images/image.gif is that stating that it will look for the next folder inside that one named images.

and this would mean
/images/image.gif is stating it will go back to the root directory and start over from there it think that is right

bryan

jag5311's picture

They have: 202 posts

Joined: Jan 2002

Here is some code for you from my menu.shtml the navigation menu


Home
  

Should all of those be changed to /weirdbackground.gif

/index.html

/cheats.html

should it be like that?

Brian Farkas's picture

They have: 1,015 posts

Joined: Apr 1999

Hi,
Yes, what you mentioned is correct (add a / in front of the links).

Good luck!

Brian

They have: 117 posts

Joined: Feb 2002

Whenever I do includes (or .js files which I use for nav tables), I base tag every page. That way each page calculates its paths from the root web directory.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.