Hi Chris,
Indeed, we do love open source. <grin>
Thanks for the link to the freemarker docs. I've found them very useful already, and I *thought* I was grokking them correctly, but maybe not. I was basing my example on this one in that doc, http://www.freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_missing_test
Your logic would work for me as well, but unfortunately the example you sent doesn't work either.
Any other ideas for how I could test this out?
--
-----Original Message-----
From: Chris Holmes [mailto:cholmes@anonymised.com]
Sent: Wednesday, January 09, 2008 3:48 PM
To: Andre, Roger/SEA
Cc: geoserver-users@lists.sourceforge.net
Subject: Re: [Geoserver-users] Freemarker expression support in KML description.ftl
Should be. I believe the templates give you everything you can do in freemarker, you can see the full range here:
http://freemarker.org/docs/dgui_template_exp.html
(we love open source 
Comparisons are talked about here:
http://freemarker.org/docs/dgui_template_exp.html#dgui_template_exp_comparison
It looks like what you're trying to do would be:
<#if ${COUNTRY.value} = "Australia">
The Country is ${COUNTRY.value}, the currency is ${CURR_TYPE.value}.
</#if>
<#if ${COUNTRY.value} != "Australia">
Nothing found
</#if>
So not a nice else statement, but I think you can get at the same thing.
If that doesn't work let us know.
Chris
Roger.Andre@anonymised.com wrote:
Is it possible to use comparison expressions in a description.ftl to
alter the content of the description balloon based on attribute values?
For example:
<#if ${COUNTRY.value} = 'Australia'>
The Country is ${COUNTRY.value}, the currency is ${CURR_TYPE.value}.
<#else>
Nothing found.
</#if>
(which doesn't work btw)
--
Roger André
GIS Developer/Analyst
Enterprise Management Solutions
CH2M HILL
1100 112th Avenue NE
Suite 400
Bellevue, WA 98004
Direct 425.233.3042
roger.andre@anonymised.com <mailto:roger.andre@anonymised.com>
Developing People through Challenging Projects
!DSPAM:4005,47855b60134751637810514!
----------------------------------------------------------------------
--
----------------------------------------------------------------------
--- Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for just about anything
Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marke
tplace
!DSPAM:4005,47855b60134751637810514!
----------------------------------------------------------------------
--
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users
!DSPAM:4005,47855b60134751637810514!