Hi,

   Thanks to everyone who contributed their inputs. I was able to
resolve the issue.

Thanks,
Sharad

--- [EMAIL PROTECTED] wrote:

> Send Html-template-users mailing list submissions to
>       [EMAIL PROTECTED]
> 
> To subscribe or unsubscribe via the World Wide Web, visit
>       https://lists.sourceforge.net/lists/listinfo/html-template-users
> or, via email, send a message with subject or body 'help' to
>       [EMAIL PROTECTED]
> 
> You can reach the person managing the list at
>       [EMAIL PROTECTED]
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Html-template-users digest..."
> 
> 
> Today's Topics:
> 
>    1. Re: Problem accessing directories through .tmpl files (Offer
> Kaye)
>    2. Re: Problem accessing directories through .tmpl
>        files (Carl Franks)
> 
> --__--__--
> 
> Message: 1
> Date: Thu, 25 Nov 2004 08:58:48 +0200
> From: Offer Kaye <[EMAIL PROTECTED]>
> Reply-To: Offer Kaye <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: [htmltmpl] Problem accessing directories through .tmpl
> files
> 
> On Tue, 23 Nov 2004 20:26:42 -0800 (PST), Kasturirangan Rangaswamy
> wrote:
> > 
> >    Below are the details (Consider
> >                        ROOT=/usr/local/apache/htdocs/homepages)
> > 
> > Main Perl Script (present in ROOT/software/cgi-bin/sample/)
> > 
> 
> You need to place the images and CSS files (if you don't supply a
> path
> for them when calling them) either in ROOT or where your main Perl
> script is (i'm unsure - try). This is a matter of logic, not
> HTML::Template or <tmpl_include> tags. The final generated HTML is
> the
> one you are viewing, not the templates, and all paths should be
> relative to it, not the template sources.
> 
> Regards,
> -- 
> Offer Kaye
> 
> 
> --__--__--
> 
> Message: 2
> Date: Thu, 25 Nov 2004 09:10:42 +0000
> From: "Carl Franks" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Subject: Re: [htmltmpl] Problem accessing directories through .tmpl
>       files
> 
> Sharad,
> 
> The paths to your image files (and css, js, etc) are relative to the
> CGI script. The folder that the .tmpl file is in is irrelevant.
> Also filesystem paths are irrelevant: it's the website paths you need
> to know.
> 
> e.g. if the CGI is at "/cgi-bin/sample/display.pl"
> Then the image files must be somewhere inside the "htdocs" folder for
> the webserver to be able to serve them.
> So if an image is at "/images/pic.jpg",
> then the IMG tag source should either be:
> src="/images/pic.jpg"
> which is an 'absolute' path in relation to the web-root.
> or:
> src="../../images/pic.jpg"
> which is relative to the path of the CGI file.
> 
> Remember, any files referenced from a webpage, such as an image or
> css
> file, must be within your htdocs folder.
> They aren't magically included by the CGI, they are requested by your
> browser, and so must be visible to the webserver.
> 
> Hope this helps,
> Carl
> 
> 
> >>> Kasturirangan Rangaswamy <[EMAIL PROTECTED]> 24/11/2004
> 04:26:42 >>>
> Hi,
> 
>    I have a small Perl Script that calls a .tmpl file A.tmpl. This
> .tmpl file has two <TMPL_INCLUDE> statements that include two other
> files B.tmpl and C.tmpl. 
> 
>    Files A,B and C are in the same directory. I am able to display
> the
> three of them as a single HTML file. No problems till here.
> 
>    Now, the B.tmpl and C.tmpl files access images stored in yet
> another
> directory (NOTE: Also tested by putting them in same directory and
> that
> is not working either!!!). Those images are not getting displayed.
> 
>    Below are the details (Consider 
>                        ROOT=/usr/local/apache/htdocs/homepages)
> 
> Main Perl Script (present in ROOT/software/cgi-bin/sample/)
>
-----------------------------------------------------------------------
> #!/usr/local/bin/perl
> 
> use HTML::Template;
> my $template = HTML::Template->new(filename =>
> "$ENV{DOCUMENT_ROOT}/software/html/Index.tmpl");
> print "Content-Type: text/html\n\n";
> print $template->output;
>
-----------------------------------------------------------------------
> 
> Index.tmpl (present in ROOT/software/html/)
>
-----------------------------------------------------------------------
> <TMPL_INCLUDE top_screen.tmpl>
> <TABLE>some table items that do not refer to images/CSS and have not
> been included here</TABLE>
> <TMPL_INCLUDE bottom_screen.tmpl>
>
------------------------------------------------------------------------
> 
> top_screen.tmpl (present in ROOT/software/html/)
>
-----------------------------------------------------------------------
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <!-- saved from url=(0034)http://www.uc.edu/softwareinstall/ -->
> <!--- top header included in another file---><HTML><HEAD><TITLE>UCit
> -
> Software Distribution</TITLE>
> <META http-equiv=Content-Type content="text/html;
> charset=windows-1252"><LINK
> href="main.css" rel=stylesheet>
> <META content="MSHTML 6.00.2800.1476" name=GENERATOR></HEAD>
> <BODY leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">
> <TABLE cellSpacing=0 cellPadding=0 width=800 border=0>
>   <TBODY>
>   <TR>
>     <TD colspan=3><IMG alt=""
>       src="banner_software.gif" border=0><IMG
>       alt="" src="banner_right.gif"
>     border=0></TD>
>   </TR>
>   <TR>
>     <TD width=616>
>       <TABLE cellSpacing=0 cellPadding=0 width=616 align=left
> border=0>
>         <TBODY>
>         <TR>
>           <TD width=48><IMG height=37 alt=""
>             src="menu_left_middle.gif"
>             width=48 border=0></TD>
>         </TR>
>       </TABLE>
>     </TD>
>   </TR>
>   </TBODY>
> </TABLE>
>
-----------------------------------------------------------------------
> 
> bottom_screen.tmpl (present in ROOT/software/html/)
>
-----------------------------------------------------------------------
> <TABLE cellSpacing=0 cellPadding=0 width=800 border=0>
> <TBODY>
>         <TR>
>           <TD colSpan=4><BR><IMG height=49
>               src="footer.gif" width=800
>               useMap=#footer border=0></TD></TR>
>   </TBODY>
> </TABLE>
> <!--
> <MAP name=footer><AREA shape=RECT alt=Search coords=34,8,95,39><AREA
> shape=RECT alt="Site map" coords=108,8,188,39>
>                  <AREA shape=RECT alt="Contact us"
> coords=202,8,293,39
> href="http://www.ucit.uc.edu/contactus.asp";>
>                  <AREA shape=RECT alt="UCit home" coords=305,8,402,39
> href="http://www.ucit.uc.edu/";>
> </MAP>-->
> 
> </BODY>
> </HTML>
>
-----------------------------------------------------------------------
> 
> Though the 3 .tmpl files are getting displayed in one page,
> none of the '.gif' or '.css' files in top_screen.tmpl and
> bottom_screen.tmpl get displayed. Their actual location is
> ROOT/software/images/ but I put them in the same directory as the
> .tmpl
> files hoping they would work but they don't.
> 
> Any idea why this might be happening?
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to