Hi Robert,<div><br></div><div>What you can do in fact is:</div><div><br></div><div>- Make a geoserver template that will return your data in JSON format</div><div>- Then, process the data as you wish on the client side (this is, using GeoExt)</div>
<div><br></div><div>Below you can find an example of content.ftl that is returning the data in JSON format.</div><div><br></div><div><div>[{</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;#assign i = 0 /&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;#list type.attributes as attribute&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;#if (i &gt;= 0) &amp;&amp; (!attribute.isGeometry)&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>&quot;${<a href="http://attribute.name">attribute.name</a>}&quot;:</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;#list features as feature&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;#assign k = 0 /&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;#list feature.attributes as attribute&gt;</div><div>
<span class="Apple-tab-span" style="white-space:pre">                                        </span>&lt;#if (k = i) &amp;&amp; (!attribute.isGeometry)&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>&quot;${attribute.value}&quot;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                        </span>&lt;/#if&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                        </span>&lt;#assign k = k+1 /&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;/#list&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;#if attribute_has_next&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                                                </span>,</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>&lt;/#if&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                        </span>&lt;/#list&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;/#if&gt;</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>&lt;#assign i = i+1 /&gt;</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>&lt;/#list&gt;</div><div>}]</div><div><br></div><div>hope this helps.</div><div>Cheers,</div><div><br></div><div>Hugo</div><br><div class="gmail_quote">On Thu, Jul 21, 2011 at 12:15 PM, Robert Buckley <span dir="ltr">&lt;<a href="mailto:robertdbuckley@yahoo.com">robertdbuckley@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><div style="font-family:arial, helvetica, sans-serif">
<code>Hi,</code></div><div style="font-family:arial, helvetica, sans-serif"><code><br></code></div><div style="font-family:arial, helvetica, sans-serif"><code>Standard format... </code><span style="font-family:monospace">text/html as defined in the Parameter tab in Firebug.</span></div>
<div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace"><br></span></div><div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace">I have read that if the format is
 changed, then the attributes can be manipulated ie fields can be left out. I havenīt seen any code fór it though.</span></div><div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace"><br>
</span></div><div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace">I have tried with the content.ftl file in the geoserver workspaces, but the results are pretty grim! I would rather do it in javascript so that everything is kept in my app and not spread around different applications.</span></div>
<div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace"><br></span></div><div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace">yours,</span></div><div style="font-family:arial, helvetica, sans-serif">
<span style="font-family:monospace"><br></span></div><div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace">Rob</span></div><div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace"><br>
</span></div><div class="hm"><div style="font-family:arial, helvetica, sans-serif"><span style="font-family:monospace"><br></span></div></div><div style="font-family:arial, helvetica, sans-serif;font-size:10pt"><div class="hm">
<br></div><div style="font-family:arial, helvetica, sans-serif;font-size:13px"><div class="hm"><font size="2" face="Tahoma"><hr size="1"><b><span style="font-weight:bold">Von:</span></b> &quot;<a href="mailto:dan@inlet.geol.sc.edu" target="_blank">dan@inlet.geol.sc.edu</a>&quot; &lt;<a href="mailto:dan@inlet.geol.sc.edu" target="_blank">dan@inlet.geol.sc.edu</a>&gt;<br>
<b><span style="font-weight:bold">An:</span></b> Robert Buckley &lt;<a href="mailto:robertdbuckley@yahoo.com" target="_blank">robertdbuckley@yahoo.com</a>&gt;<br><b><span style="font-weight:bold">CC:</span></b> <a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a><br>
<b><span style="font-weight:bold">Gesendet:</span></b> Donnerstag, den 21. Juli 2011, 12:24:24 Uhr<br><b><span style="font-weight:bold">Betreff:</span></b> Re: [Users] control which fields are displayed in my Geoext popups<br>
</font></div><div><div></div><div class="h5"><br>What is the format of the data coming back from the WMSGetFeatureInfo?<br><br>&gt; Hi,<br>&gt;<br>&gt; I would like to do the following and after several hours of trying and<br>
&gt; googling<br>&gt; will have to admit that I havenīt got far.<br>&gt;<br>&gt; I want to ...<br>&gt;<br>&gt; 1. Restrict the fields displayed in my popup window so that I can control<br>&gt; which<br>&gt; fields are displayed. I donīt want to show fid, objectid etc<br>
&gt;<br>&gt; 2. Ideally I would like to use the accordion layout for when there is more<br>&gt; than<br>&gt; one queryable layer, but I canīt find any code to implement this. I have<br>&gt; seen it<br>&gt; on Bryan Mcbrides explorer, but apart from that canīt find any<br>
&gt;
 documentation.<br>&gt;<br>&gt; currently I have a popup designed like this...<br>&gt;<br>&gt;<br>&gt; // create the popup<br>&gt; var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo({<br>&gt; queryVisible: true,<br>
&gt; highlightOnly: true,<br>&gt; maxFeatures: 5,<br>&gt; layers: [layer_wea_wms,EnMap_SG_WEA_f]<br>&gt; });<br>&gt;<br>&gt; featureInfo.events.on({<br>&gt;     getfeatureinfo: function(e) {<br>&gt;         new GeoExt.Popup({<br>
&gt;             title: &quot;Position:<br>&gt; &quot;+mappanel.map.getLonLatFromPixel(e.xy).transform(epsg900913, epsg4326),<br>&gt;             width: 400,<br>&gt; autoHeight: true,<br>&gt; layout: &#39;accordion&#39;,<br>
&gt; bodyStyle: &#39;background-color:#FFF;,font-size:14px;&#39;,<br>&gt;             autoScroll: true,<br>&gt;             maximizable: true,<br>&gt;   
          map: mappanel.map,<br>&gt;             lonlat: mappanel.map.getLonLatFromPixel(e.xy),<br>&gt;             html:&#39;&lt;p style=&quot;font-size:10px;&quot;&gt;Attributen&lt;/p&gt;&lt;br&gt;&#39;+e.text,<br>&gt; unpinnable:true,<br>
&gt; anchored: true,<br>&gt; shadow: true,<br>&gt; listeners: {<br>&gt;                     close: function() {<br>&gt;                         // closing a popup destroys it, but our reference<br>&gt; is<br>&gt; truthy<br>
&gt;                         popup = null;<br>&gt;                     }<br>&gt; }<br>&gt;         }).show();<br>&gt;     }<br>&gt; });<br>&gt;<br>&gt; map.addControl(featureInfo);<br>&gt;
 featureInfo.activate();<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; thanks for any help_______________________________________________<br>&gt; Users mailing list<br>&gt; <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a><br>
&gt; <a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>&gt;<br><br><br></div></div></div></div><div style="font-family:arial, helvetica, sans-serif">
</div>


</div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@geoext.org">Users@geoext.org</a><br>
<a href="http://www.geoext.org/cgi-bin/mailman/listinfo/users" target="_blank">http://www.geoext.org/cgi-bin/mailman/listinfo/users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Hugo Martins<br>LabNT - ISEGI UNL<br>Campus de Campolide<br>1070-312 Lisboa<br>N 38°43&#39;56.84&quot;, W 9°9&#39;35.74&quot;<br>
</div>