Parent Path and Include Files

Discussion in 'ASP General' started by MDW, May 12, 2005.

  1. MDW

    MDW Guest

    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!
     
    MDW, May 12, 2005
    #1
    1. Advertising

  2. MDW

    Steven Burn Guest

    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" <> wrote in message news:...
    > 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!
     
    Steven Burn, May 12, 2005
    #2
    1. Advertising

  3. MDW

    MDW Guest

    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" <> wrote in message news:...
    > > 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!

    >
    >
     
    MDW, May 12, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andreas Bogenberger
    Replies:
    3
    Views:
    1,011
    Andreas Bogenberger
    Feb 22, 2008
  2. \A_Michigan_User\

    Various path/path/files.asp all #include this 1 file

    \A_Michigan_User\, Jul 10, 2005, in forum: ASP General
    Replies:
    1
    Views:
    264
    Jeff Cochran
    Jul 10, 2005
  3. Dave
    Replies:
    1
    Views:
    158
    Yuan Ren[MSFT]
    Dec 5, 2005
  4. Eric
    Replies:
    10
    Views:
    505
  5. Eric
    Replies:
    0
    Views:
    280
Loading...

Share This Page