<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Preformattato HTML Carattere";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.PreformattatoHTMLCarattere
        {mso-style-name:"Preformattato HTML Carattere";
        mso-style-priority:99;
        mso-style-link:"Preformattato HTML";
        font-family:Consolas;
        mso-fareast-language:IT;}
span.gmail-o
        {mso-style-name:gmail-o;}
span.gmail-n
        {mso-style-name:gmail-n;}
span.gmail-s2
        {mso-style-name:gmail-s2;}
span.gmail-si
        {mso-style-name:gmail-si;}
span.StileMessaggioDiPostaElettronica25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=IT link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US>We are using Geonode version 2.10.1, the .ftl content has been correctly created; the preview of the layer in Geoserver displays the relative photo contained in the attributes, which does not happen in the Geonode / MapStore view.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Hence our doubt in the direct visualization of the photo attribute. (Photo viewable only as external link from path html contained in the attributes).</span><span lang=EN-US style='mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'>Anyone can help us?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Thank you for helping.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Gianluca<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b>Da:</b> Amedeo Fadini <amefad@gmail.com> <br><b>Inviato:</b> martedì 19 novembre 2019 10:19<br><b>A:</b> Gianluca Zanatta - ABACO S.p.A. <gianluca.zanatta@abacospa.it><br><b>Cc:</b> geonode-users <geonode-users@lists.osgeo.org><br><b>Oggetto:</b> Re: [GeoNode-users] Layer Feature info<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><div><div><p class=MsoNormal>Hi Gianluca,<o:p></o:p></p></div><div><p class=MsoNormal>I'm very glad to see you in the list!<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Your installation of geonode relies on Geoserver, the simpliest way is to use freemarker templates.<o:p></o:p></p></div><div><p class=MsoNormal>Read more at this link:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal><a href="https://docs.geoserver.org/stable/en/user/tutorials/GetFeatureInfo/index.html">https://docs.geoserver.org/stable/en/user/tutorials/GetFeatureInfo/index.html</a><o:p></o:p></p></div><div><p class=MsoNormal><a href="https://docs.geoserver.org/stable/en/user/tutorials/freemarker.html#tutorial-freemarkertemplate">https://docs.geoserver.org/stable/en/user/tutorials/freemarker.html#tutorial-freemarkertemplate</a><o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>You need to prepare the YAML template file and put it into the <o:p></o:p></p></div><div><p class=MsoNormal><geoserver_data_dir>/workspaces/geonode/<layer_name> <o:p></o:p></p></div><div><p class=MsoNormal>folder,<o:p></o:p></p></div><div><p class=MsoNormal>I guess you can find already existing templates I made searching for *.ftl. files. By the way  to display the content of  field named "PHOTO" the code is straightforward:<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><pre><span class=gmail-o><</span><span class=gmail-n>img</span> <span class=gmail-n>src</span><span class=gmail-o>=</span><span class=gmail-s2>"<a href="http://%3cyour_server_url%3e/$%7bfeature.PHOTO.value%7d">http://<your_server_url>/${feature.PHOTO.value}</a>"</span><span class=gmail-o>/></span><o:p></o:p></pre></div><div><p class=MsoNormal>Of course you can also manage this  parsing the HTML or text response on the client side,  if you are planning to upgrade to Geonode 2.10 there's some mapstore  options like outputgrid config [0] (not sure if are natively included in the geonode edition... could anyone confirm?).<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Feel free to contact me even directly if you need specific help on that installation.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Have a nice day<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Amedeo<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>[0] <a href="https://github.com/geosolutions-it/mapstore/wiki/WMS-Get-Feature-Info-Menu#customize-grid-format-to-display-custom-fields-hide-and-display-them">https://github.com/geosolutions-it/mapstore/wiki/WMS-Get-Feature-Info-Menu#customize-grid-format-to-display-custom-fields-hide-and-display-them</a><o:p></o:p></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><div><p class=MsoNormal>Il giorno mar 19 nov 2019 alle ore 09:26 Gianluca Zanatta - ABACO S.p.A. <<a href="mailto:gianluca.zanatta@abacospa.it">gianluca.zanatta@abacospa.it</a>> ha scritto:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>Dear all,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>We are having an issue with the layer feature info: in the layer attribute table we have a “photo” field and we need to display it in the layer feature info panel when we query the Objects on map.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US style='font-size:10.0pt;font-family:"Courier New";color:black'>How is possible to display the photo/image in the layer info panel?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><pre><span lang=EN-US style='color:black'>Thank you for helping.</span><o:p></o:p></pre><pre><span lang=EN-US style='color:black'>Cheers,</span><o:p></o:p></pre><pre><span lang=EN-US style='color:black'>Gianluca</span><o:p></o:p></pre><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'> <o:p></o:p></p></div></div><p class=MsoNormal>_______________________________________________<br>geonode-users mailing list<br><a href="mailto:geonode-users@lists.osgeo.org" target="_blank">geonode-users@lists.osgeo.org</a><br><a href="https://lists.osgeo.org/mailman/listinfo/geonode-users" target="_blank">https://lists.osgeo.org/mailman/listinfo/geonode-users</a><o:p></o:p></p></blockquote></div></div></div></body></html>