<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2015-04-20 9:15 GMT+02:00 Carles Vico Blanco <span dir="ltr"><<a href="mailto:carles.vico@geografos.org" target="_blank">carles.vico@geografos.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div>Thanks a lot for your work Alessandro! Simple filter for a big problem! Finally we have apply our styles to the GetFeatureInfo response with your <font color="#000000">GetFeatureInfoCSSFilter.py, where we have directly insert the CSS parameters (without templates).<br></font></div>
<div>Now, we need to increase the control about this GetFeatureInfo response in two ways:</div>
<div> </div>
<div>The first case is that, the attributes of my layers who are URL (http://...) can be understood as links for the QGIS Server and displayed with linkstyles that I've been included in the GetFeatureInfoCSSFilter.</div>
<div> </div>
<div>The second is that, the response of my GetFeatureInfo request, for now show me all the layers of my QGSProject, included the layers with NO INFO values at the point of my request (show me only the header of the atributte table, without info). How can I do that the response hide the headers of the attribute table layers with NO INFO values? </div>
<div> </div>
<div>Any Filter? Templates?</div>
<div> </div>
<div>I have seen that in the Web Client you can modify the globaloptions.js to setup some of this, but I'm not sure they take effect in the QGIS Server response, outside Web Client.</div>
<div> </div><br></blockquote><div><br></div><div>Hello Carles,<br></div><div><br></div><div>No, the globaloptions.js are the options for QGIS Web Client (that is an HTML/Javascript WEB GIS for the browser) and not for  QGIS server.<br></div><div>You can decide to manipulate the GetFeatureInfo response in the client or in the server.<br><br></div><div>In the first case, you will use the options given in QGIS Web Client (and IIRC there is one to show URLs as links), in the latter you will use a QGIS Server Python plugin.<br><br></div><div>In my article [1] you can find a working example of server side filtering, for a very simple REGEXP substitution (string injection) but also a final hint about further and more complex output filtering. From that point it's up to you but there is basically nothing left in QGIS domain: it's everything pretty standard text manipulation or XML templating/transformation. As long as you have your XML parsed into an object you can also check for the presence of  results in a layer and decide what to do in you final output.<br><br></div><div></div><div><br>[1] <a href="http://www.itopen.it/qgis-server-getfeatureinfo-with-style/">http://www.itopen.it/qgis-server-getfeatureinfo-with-style/</a><br></div></div><br>-- <br><div class="gmail_signature">Alessandro Pasotti<br>w3:   <a href="http://www.itopen.it" target="_blank">www.itopen.it</a></div>
</div></div>