[Chameleon] variable sustitution

Alejandro Narvaez agnarvaez at gmail.com
Mon Feb 22 20:13:33 EST 2010


Julien

Thanks for your help.

I introduce the sentence but doesn't work

The template can read and show the variable value, but the mapfile doesn't.

I am missing something or I am doing something wrong, I appreciate any help


Alejandro Narváez


2010/2/22 Julien-Samuel Lacroix <jlacroix at mapgears.com>

> Hi,
>
> Add the following in your template:
> <input type="hidden" name="pack" value="[$pack$]">
>
> The variable you set via the code are not automatically added to hidden
> variables of the form.
>
> Julien
>
> Alejandro Narvaez wrote:
>
>> I am trying to use variable substitution with chameleon, but I have not
>> achieved that it works.
>> Someone might indicate how to do that.
>>
>>
>> In mapfile I introduce this sentences
>>
>> DATA "select * from localidad inner join base on
>> localidad.localidad=base.localidad where base.pack='%pack%'"
>> and, into de index.html, theese
>>
>> $oApp->CWCInitialize( $szTemplate, $szMapFile, $szContext  );
>> *$oLayer = $oApp->moMapSession->oMap->getLayerByName('layer name');*
>> *$oApp->setVar('pack', 'variable value' );*
>> $oApp->CWCExecute(array(dirname(__FILE__)."/widgets"));
>>
>>
>> thanks
>>
>> Alejandro Narváez
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>
> --
> Julien-Samuel Lacroix
> Mapgears
> http://www.mapgears.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20100222/50c7d133/attachment.htm 


More information about the Chameleon mailing list