[ic] Local variables not being parsed
Jon Jensen
jon at endpoint.com
Mon Jan 14 21:19:11 EST 2008
On Fri, 11 Jan 2008, Curt Hauge wrote:
> I have everything running great, but local variables are not being
> parsed when they are located in CATROOT/templates/foundation/regions or
> CATROOT/variables. They display __PHONE__, for example instead of
> "612-555-1234".
>
> If I put __PHONE__ in the results.html page found in CATROOT/pages, it works
> as it should.
>
> This is happening on a freshly installed test catalog as well, under the
> same Interchange install.
>
> It is not, however, affecting other freshly installed/moved older
> catalogs on the same server using a different instance of Interchange.
This is because the variables are being defined by the DirConfig Variable
directive in catalog.cfg, which slurps in those templates into variables,
and when you use them, their output is not reparsed for variables they
contain.
Other ways of defining variables may interpolate the variables at
definition time, giving the illusion that they're reparsed for variables
when output.
One surefire way to have templates include variables is to use the form
[var WHATEVER] instead of __WHATEVER__.
Also, interestingly, if you use the @_WHATEVER_@ form, it will reparse
its output, while straight global @@ and catalog __ will not. See
&Vend::Interpolate::vars_and_comments for details.
Jon
--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
More information about the interchange-users
mailing list