<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>
<div>Thanks</div>
<div>Carles Vico</div>
<div><br> </div>
<div class="gmail_quote">2015-04-10 12:47 GMT+02:00 Alessandro Pasotti <span dir="ltr"><<a href="mailto:apasotti@gmail.com" target="_blank">apasotti@gmail.com</a>></span>:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">Hi,<br><br>there have been some requests in the past about custom CSS for html<br>GetFeatureInfo responses from QGIS Server.<br><br>Currently, the HTML response template is hardcoded and there is no way<br>to customize it, the Python plugin support introduced with the latest<br>version of QGIS Server provide some easy ways to add some custom CSS<br>rules or even provide custom templates.<br><br>To get you started, I've added a new filter to my example HelloServer plugin:<br><br><a href="https://github.com/elpaso/qgis-helloserver/blob/master/filters/GetFeatureInfoCSSFilter.py" target="_blank">https://github.com/elpaso/qgis-helloserver/blob/master/filters/GetFeatureInfoCSSFilter.py</a><br><br>This filter is pretty simple, if the request is a WMS GetFeatureInfo<br>with HTML format, it injects a STYLE tag into the HTML HEAD.<br><br>As an exercise left to the reader, you can also intercept the call in<br>requestReady(self), change the INFO_FORMAT to text/xml and then do<br>some real templating, for example by using XSLT or pasrsing the XML<br>and injecting the values into a custom template.<br><span class="HOEnZb"><font color="#888888"><br><br><br>--<br>Alessandro Pasotti<br>w3: <a href="http://www.itopen.it/" target="_blank">www.itopen.it</a><br>_______________________________________________<br>Qgis-user mailing list<br><a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br></font></span></blockquote></div><br>