<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.17097" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=280372607-19092011>Hi Steve, </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=280372607-19092011></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=280372607-19092011>thanks for the tip. Most of my users have desktop GIS 
systems (MapInfo, ArcMap, etc.), but I might test whether these support a 
JavaScript-based solution. </SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=280372607-19092011>In the mean time, could you expand a bit on the 
"new-style templates"? All I have done so far is according to <A 
href="http://mapserver.org/mapfile/template.html#template">http://mapserver.org/mapfile/template.html#template</A>, 
and I don't remember that this says anything about inclusion of 
subtemplates.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=280372607-19092011></SPAN></FONT>&nbsp;</DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN 
class=280372607-19092011>Julian</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=da dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Fra:</B> Steve Lime [mailto:sdlime@gmail.com] 
<BR><B>Sendt:</B> 15. september 2011 20:43<BR><B>Til:</B> Hollingbery, 
Julian<BR><B>Cc:</B> &lt;mapserver-users@lists.osgeo.org&gt;<BR><B>Emne:</B> Re: 
[mapserver-users] Generic template for WMS GetFeatureInfo<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV>Hi Julian: You might try the [items] and [values] template tags combined 
with a little JavaScript. Those tags output a delimited list of items and values 
for a feature or set of features. You could split the output into arrays and 
display however you like. The attributes are just slammed together into 1 comma 
delimited string, so this approach won't work if your attribute data contains 
commas I fear. The same template in theory could be used for any layer then... 
You could use new-style templates (e.g. Via output formats) with template 
includes and handle this with 2 files- the main template and the shared 
include...</DIV>
<DIV><BR></DIV>
<DIV>I notice those tags aren't documented so I'll create a ticket to do so. 
Should also probably enhance those tags, at least the values one, to take some 
simple formatting options.</DIV>
<DIV><BR></DIV>
<DIV>Steve<BR><BR>Sent from my iPad</DIV>
<DIV><BR>On Sep 14, 2011, at 8:39 AM, "Hollingbery, Julian" &lt;<A 
href="mailto:julho@kms.dk">julho@kms.dk</A>&gt; wrote:<BR><BR></DIV>
<DIV></DIV>
<BLOCKQUOTE type="cite">
  <DIV><!-- Converted from text/rtf format -->
  <P><FONT face=Arial size=2>Hi list,</FONT> </P>
  <P><FONT face=Arial size=2>I too want to serve GetFeatureInfo requests. 
  However, I wonder if it is necessary to have a template per layer, when all I 
  want to do is "show all attribute values in a HTML table". The thing is, I 
  have a handful of services with approx. 40 layers in each. Each layer has on 
  average a dozen attributes, so all in all, I am looking to simplify 
  maintenance of 2000 HTML table cells. Has anyone done anything in a script or 
  otherwise, so that one can use the same template file on layers with varying 
  attribute lists?</FONT></P>
  <P><FONT face=Arial size=2>I am considering utilising the fact that a TEMPLATE 
  statement can reference a URL: I imagine that this might refer to a 
  PHP-script, which takes e.g. a database table name, and returns a HTML 
  response with the column names. Has anyone done anything like this?</FONT></P>
  <P><FONT face=Arial size=2>Regards,</FONT> <BR><FONT face=Arial size=2>Julian 
  Hollingbery</FONT> </P></DIV></BLOCKQUOTE>
<BLOCKQUOTE type="cite">
  <DIV><SPAN>_______________________________________________</SPAN><BR><SPAN>mapserver-users 
  mailing list</SPAN><BR><SPAN><A 
  href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</A></SPAN><BR><SPAN><A 
  href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</A></SPAN><BR></DIV></BLOCKQUOTE></BODY></HTML>