There is limited "logic" support in the item tag. There are two attributes to consider:
- nullformat, sets the string to be displayed if the item is empty [item name=test nullformat="n\a" ...] - pattern, sets a regex to check the item against, results are only displayed if the item value matches [item name=test pattern="foo" format="bar"] You might be able to combine the two, not sure about that though. Let me know if you have questions. Steve -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of sulu Sent: Monday, March 14, 2011 8:14 AM To: [email protected] Subject: [mapserver-users] How to format a GetfeatureInfoRequest results? Hi. I'm in search of information/tutorial on formatting GetfeatureInfoRequests by using HTML-Templates. As an example; assume there is an attibute "test" which may have some content or may not. As far as i know i can format the result in the Body-HTML-Template like that: [item name=test format=$value escape=none] This works but i would like to add some logic in order to improve it a bit. E.g. add an if clause that returns "n/a" if the attribute has no content or turn it red if the value exceeds som threshold. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/How-to-format-a-GetfeatureInfoRequest-results-tp6168987p6168987.html Sent from the Mapserver - User mailing list archive at Nabble.com. _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
