Parent Path and Include Files

M

MDW

I’ve got a menu file that’s saved as an .shtml document. I don’t want to post
the code, but essentially it’s a simple HTML table, with an XSL template
wrapped around it. This way, I can include the file from HTML, ASP, or from
an XML stylesheet.

The actual file inclusion works fine. My problem is that the menu uses
images, which are saved in a different directory than the include file
itself. The overall web structure is this:

webroot/default.asp
webroot/includes/nav.shtml
webroot/images/menu_image.gif
webroot/articles/xml_stylesheet.xsl
webroot/articles/article_subject/article_document.xml

I want to use this same menu on every page of the site, from the default.asp
to each of the article.xml files.

What I can’t figure out is this – the menu uses pictures, which are saved in
the “images†directory. I’m very vaguely familiar with how to use parent
paths to get to the image files, but depending on where the include file is
being used, I might have to do back a different number of levels.

For instance, from the default.asp file, the path would be <img
src=â€images/menu_image.gifâ€>. From the article.xml files, though, the path to
that same image would be <img src=â€../../../images/menu_image.gifâ€> or
something like that.

My question is – is there some way to use an include file that needs parent
paths in multiple places on your web site?

I apologize if the question doesn’t make sense….
 
S

Steven Burn

Code you can use regardless of the asp/htm etc file locations;

<img src="/images/imgSomeImage.gif">

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top