Forum Moderators: phranque
I'm currently in the process of re-structuring my website into multiple subdirectories. It used to be all be based in the root directory, with directories for images, style sheets & javascript files.
Now its all very well editing each page to make up for the new directories, the only problem is that I was originally using file includes for my navigation.
Now I have gotten round my first level of directories by making the include a virtual one (
<!--#include virtual="/nav.shtml" --> ), using absolute linking for the images. Level 2 however, seems to include the file but it won't display the images... I'v tried using absolute linking by specifying the domain and not ie. <img src="/images/other/foo.jpg"> <img src="http://www.mydomain.com/images/other/foo.jpg"> I can't get either option to work. The last thing I want to do is make an include page for each directory level. Is there a simple answer?
I have a feeling its something to do with the include file constantly being set as
<!--#include virtual="/nav.shtml" --> even when its 2 levels deep. Should I be using <!--#include virtual="/../nav.shtml" --> or something similar? Or does anyone know if there is something I can universally use to specify the root directory?
/me slaps himself
Ok, I worked it out. My code is flawless, my test directory however, is set up off my main directory (which has my old site on it) So the page I was telling it to include WAS in the root directory, but not in my test directory. It was picking up my current include page, which does not have the images set as absolute!
/me whacks himself again. \o/