[Chameleon] Server side include?

Julien-Samuel Lacroix jlacroix at dmsolutions.ca
Tue Jul 6 14:18:25 EDT 2004


> So how do I include my include with my include (That
> sounds kinda cool ;) )
> 
> I tried this:
> [#http://www.test.com/cgi-bin/test.cgi?fruit=[$NAME_OF_FRUIT$]#]
> 
> It won't parse [$NAME_OF_FRUIT$] inside "##"
> I tried several different ways, but could not get it
> to work.

This can't work right now because the chameleon preprocessor parse [##] 
tags before [$$] tags. The reason is simple. This way you can include 
[$$] in components added by [##] tags. If you want to change this 
behavior, look in the TemplateParser.php file 
(chameleon/htdocs/TemplateParser.php) for the Parser() function. You 
will see that the first thing that is done in this function is the 
replacement of [##] tags and then the [$$] tags. Maybe you can invert 
them. Or parse for [$$], then for [##] and again for [$$] to replace the 
newly added tags. But this can have a little impact on performance.

Let us know what you have done and the impact on performance. :)

Thanks
Julien



-- 
------------------------------------------------------------
Julien-Samuel Lacroix            jlacroix at dmsolutions.ca
DM Solutions Group               http://www.dmsolutions.ca/
------------------------------------------------------------


More information about the Chameleon mailing list