See <a href="http://mapserver.org/output/template_output.html">http://mapserver.org/output/template_output.html</a> for more info. The idea was to wrap templates in output formats so you can support multiple output types with a single mapfile. You&#39;d have to do that with multiple layers using the old scheme. Plus one template can reference many layers so there are Far less files to manage. -Steve<br>
<br>On Monday, September 19, 2011, Hollingbery, Julian &lt;<a href="mailto:julho@kms.dk">julho@kms.dk</a>&gt; wrote:<br>&gt; Hi Steve,<br>&gt;  <br>&gt; 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.<br>
&gt; In the mean time, could you expand a bit on the &quot;new-style templates&quot;? 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&#39;t remember that this says anything about inclusion of subtemplates.<br>
&gt;  <br>&gt; Julian<br>&gt; ________________________________<br>&gt; Fra: Steve Lime [mailto:<a href="mailto:sdlime@gmail.com">sdlime@gmail.com</a>]<br>&gt; Sendt: 15. september 2011 20:43<br>&gt; Til: Hollingbery, Julian<br>
&gt; Cc: &lt;<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>&gt;<br>&gt; Emne: Re: [mapserver-users] Generic template for WMS GetFeatureInfo<br>&gt;<br>&gt; 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&#39;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...<br>
&gt; I notice those tags aren&#39;t documented so I&#39;ll create a ticket to do so. Should also probably enhance those tags, at least the values one, to take some simple formatting options.<br>&gt; Steve<br>&gt;<br>&gt; Sent from my iPad<br>
&gt; On Sep 14, 2011, at 8:39 AM, &quot;Hollingbery, Julian&quot; &lt;<a href="mailto:julho@kms.dk">julho@kms.dk</a>&gt; wrote:<br>&gt;<br>&gt; Hi list,<br>&gt;<br>&gt; 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 &quot;show all attribute values in a HTML table&quot;. 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?<br>
&gt;<br>&gt; 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?<br>
&gt;<br>&gt; Regards,<br>&gt; Julian Hollingbery<br>&gt;<br>&gt; _______________________________________________<br>&gt; mapserver-users mailing list<br>&gt; <a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>&gt;