[Cartoweb-users] New DropDown Menu

Carolin Latze carolin.latze at unifr.ch
Fri Oct 19 03:25:28 EDT 2007

Hi all,

I tried to add a new plugin, which should be triggered according to the
selection in a dropdown menu. Therefore, I examined the source code for
the project chooser to build a new dropdown menu. I add to cartoclient.tpl:

      {if $tabInfo_active|default:''}
      {t}Choose Layer{/t}<br />
      <select name="layer"
      {html_options values=$layer_values output=$layer_output
      </select><br />

Then I wrote the plugin with the following renderForm method:

    public function renderForm(Smarty $template) {

        $loutput = array("Layer A", "Layer B", "Layer C");
        $template->assign(array('tabInfo_active'  => true,
                                'layer_values' => "Layer A",
                                'layer_output' => $loutput,
                                'layer' => "Layer A"));

If I access cartoweb now (using reset session) I only see the first
array element ("Layer A") in the menu. Why does it not show the others?

Thanks in advance!

Carolin Latze
Research Assistant

Department of Computer Science
Boulevard de Pérolles 90
CH-1700 Fribourg

phone: +41 26 300 83 30

More information about the Cartoweb-users mailing list