<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Legend template using group rather than layer</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2 FACE="Arial">Hi All,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I've been tying to create a legend template which generates a legend with tickboxes to turn layers on and off, but which shows groups as well. If a layer is in a group, I don't want the invidividual layer to be shown at all.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">At the moment I'm using a basic template which I think I got off the mapserver website (pasted below).</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I tried to modify it to show groups, but it doesn't seem to work. Can anyone give me a hint?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Regards,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Jacob</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">---------------------------------------------------------------------------------------------------------------------------------------</FONT></P>
<P><FONT SIZE=2 FACE="Courier New">[leg_layer_html order=ascending opt_flag=15]</FONT>
<BR><FONT SIZE=2 FACE="Courier New">[if name=CWC_TMP_LAYER oper=isnull]</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New"> <tr bgcolor="#FFFFFF"></FONT>
<BR><FONT SIZE=2 FACE="Courier New"> <td align="center"><input type="checkbox" name="legendlayername[]" value="[leg_layer_name]"</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> [if name=layer_status oper=eq value=1]CHECKED[/if]</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> [if name=layer_status oper=eq value=2]CHECKED[/if]></td></FONT>
<BR><FONT SIZE=2 FACE="Courier New"> [if name=wms_name oper=isnull]</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font face="Arial, Helvetica, sans-serif" size="1">[leg_layer_name]</font></a></td></FONT></P>
<P><FONT SIZE=2 FACE="Courier New"> </tr></FONT>
<BR><FONT SIZE=2 FACE="Courier New"> [/if]</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> [if name=wms_name oper=isset]</FONT>
<BR><FONT SIZE=2 FACE="Courier New"> <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><font face="Arial, Helvetica, sans-serif" size="1">[metadata name=WMS_TITLE]</font></a></td></FONT></P>
<P><FONT SIZE=2 FACE="Courier New"> </tr></FONT>
<BR><FONT SIZE=2 FACE="Courier New"> [/if]</FONT>
<BR><FONT SIZE=2 FACE="Courier New">[/if]</FONT>
<BR><FONT SIZE=2 FACE="Courier New">[/leg_layer_html]</FONT>
</P>
</BODY>
</HTML>