Gary Nielson <[EMAIL PROTECTED]> writes:

> Hi,
> 
> I am just trying to figure out why the following code works when included
> in base.epl, but not when called with Execute from another .epl file (as
> in [- Execute ('picture.epl') -]:

As written, this won't work because $html is not defined in the picture.epl
template.  You would have to pass it as a parameter in the Execute
statement:

[- Execute('picture.epl', $html) -]

Then, in picture.epl read that parameter in:

[- ($html) = @param; -]

If you're using EmbperlObject, you can also use the $req variable to store
data that's passed between templates.

> 
> [$ if ($html =~ /Lower/i ) $]
> <img
> src="grafix/lower_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
> 
> [$ if ($html =~ /Middle/i ) $] 
> <img
> src="grafix/middle_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
> 
> [$ if ($html =~ /Upper/i ) $]
> <img
> src="grafix/upper_school_pic.gif" width="171" height="171" border="0">
> [$ endif $]
> 
> [$ if ($html !~ /Lower|Middle|Upper/i ) $]
> <IMG SRC="[+ $dir +]grafix/index_pic.gif" width=171 height=171 border=0>
> [$ endif $]
> 
> When called with Execute, the code runs the last if statement.
> 
> Any help appreciated.
> 
> Gary
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to