By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,953 Members | 1,438 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,953 IT Pros & Developers. It's quick & easy.

Parent Path and Include Files

P: n/a
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….

--
Hmm...they have the Internet on COMPUTERS now!
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:43**********************************@microsof t.com...
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….

--
Hmm...they have the Internet on COMPUTERS now!


Jul 22 '05 #2

P: n/a
MDW
Wow, quick reply!

Thanks, I'll give that a try!

"Steven Burn" wrote:
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!

"MDW" <MD*@discussions.microsoft.com> wrote in message news:43**********************************@microsof t.com...
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….

--
Hmm...they have the Internet on COMPUTERS now!


Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.