I am running Postgres/Geoserver/OpenLayers implementation with WMS. I have
split one datastore into three layers in my map based on boolean filters in
each layer's SLD file. For example LayerA from Dataset1 has field1 = TRUE
and field2=TRUE / LayerB from same dataset has field1= FALSE and field2 =
TRUE ....
In order to get the right info into each layer's popup I have one main
content.ftl file for the whole map with a section for each layer and what
attributes to display for that layer. This has been easy if the datastore
has only one layer on the map.
I am stumped on the nested Freemarker IF statements for this multi-layer
situation.
This is what I have that works for one datastore represented as one layer.
<#if type.name = "wo_partnerorgs">
<li>Partner Organizations </li>
<ul>
<#list feature.attributes as attribute>
<#if attribute.name="poname">
<li>${attribute.value}</li>
</#if>
<#if attribute.name="podesc">
<li>${attribute.value}</li>
partners.php?gid=${feature.fid} Click Here for More Information
</#if>
</#list>
</ul>
</li>
</#if>
</#list>
I need to add something like this so that I can set conditions within the
"wo_programs" datastore for three different layers but can't work out the
syntax:
<#if attribute.name="status" && attribute.value="Active">
AND
<#if attribute.name="wc" && attribute.value="TRUE">
PRINT THESE VALUES
ELSE IF
<#if attribute.name="status" && attribute.value="INactive">
AND
<#if attribute.name="wc" && attribute.value="FALSE">
PRINT THESE VALUES
Thank you for the help.
--
View this message in context: http://old.nabble.com/Modifying-Content.ftl-to-display-multiple-layers-for-one-WMS-data-tp29402590p29402590.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.