Andrea, you're a star! I've renamed my template from content.ftl to
complex_content.ftl and this has worked perfectly - thank you very much
:-)
Best Regards,
Ryan
From: [email protected] [mailto:[email protected]] On Behalf Of
Andrea Aime
Sent: 20 November 2013 16:38
To: Ryan Moody
Cc: GeoServer Mailing List List; Francoise Kingman; Neil Kirk
Subject: Re: [Geoserver-users] App-Schema Custom GetFeatureInfo HTML
On Wed, Nov 20, 2013 at 5:23 PM, Ryan Moody <[email protected]>
wrote:
Hello,
Apologies for asking the same question twice, I was unsure if my
question below had reached the mailing list - if anyone could provide me
with any information regarding the query below, it would be really
appreciated :-)
As far as I can see, if the feature is a complex one, a different
template is used, complex_content.ftl.
The default one seems to contain this:
<#--
Macro's used for content
-->
<#macro property node>
<#if !node.isGeometry>
<#if node.isComplex>
<td> <@feature node=node.rawValue type=node.type /> </td>
<#else>
<td>${node.value?string}</td>
</#if>
</#if>
</#macro>
<#macro header typenode>
<caption class="featureInfo">${typenode.name}</caption>
<tr>
<th>fid</th>
<#list typenode.attributes as attribute>
<#if !attribute.isGeometry>
<#if attribute.prefix == "">
<th >${attribute.name}</th>
<#else>
<th >${attribute.prefix}:${attribute.name}</th>
</#if>
</#if>
</#list>
</tr>
</#macro>
<#macro feature node type>
<table class="featureInfo">
<@header typenode=type />
<tr>
<td>${node.fid}</td>
<#list node.attributes as attribute>
<@property node=attribute />
</#list>
</tr>
</table>
</#macro>
<#--
Body section of the GetFeatureInfo template, it's provided with one
feature collection, and
will be called multiple times if there are various feature collections
-->
<table class="featureInfo">
<@header typenode=type />
<#assign odd = false>
<#list features as feature>
<#if odd>
<tr class="odd">
<#else>
<tr>
</#if>
<#assign odd = !odd>
<td>${feature.fid}</td>
<#list feature.attributes as attribute>
<@property node=attribute />
</#list>
</tr>
</#list>
</table>
<br/>
Hope this helps
Cheers
Andrea
--
==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information.
==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing
conversations that shape the rapidly evolving mobile landscape. Sign up now.
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users