[GeoNode-users] text search question
Häfliger Guido
guido.haefliger at vogelwarte.ch
Thu Aug 27 08:18:21 PDT 2015
Hello
I tried to follow your description but without success, I’m not a web-programmer. I put the html-template in the folder geonode/static/geonode/js/templates. Then I should modify the file search.js. I don’t know the relation between the template and the js-File.
Is there a documentation which would help me understand the system (templates, javascript).
Best regards
Guido
____________________________________________________
Dipl. Ing. ETH Guido Häfliger
EDV/GIS-Spezialist
Tel. ++41 41 462 97 60
guido.haefliger at vogelwarte.ch
www.vogelwarte.ch
Schweizerische Vogelwarte | Seerose 1 | CH-6204 Sempach | Schweiz
Von: Simone Dalmasso [mailto:simone.dalmasso at gmail.com]
Gesendet: Donnerstag, 27. August 2015 08:13
An: Häfliger Guido
Cc: geonode-users at lists.osgeo.org
Betreff: Re: [GeoNode-users] text search question
Hi, if you are referring to the thext search box on the left part of the search pages then you need to make sure that the api supports the filtering that you need, see https://github.com/GeoNode/geonode/blob/master/geonode/api/resourcebase_api.py#L44<https://github.com/GeoNode/geonode/blob/master/geonode/api/resourcebase_api.py#L44>,
then add the html part, templates are here https://github.com/GeoNode/geonode/tree/master/geonode/templates/search,
then add the logic for the search that is in this file, https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js. Here, depending on the type of filter that you need, the logic may vary but if you want to apply a filter similar to the text one then see this part of the file https://github.com/GeoNode/geonode/blob/master/geonode/static/geonode/js/search/search.js#L369. Autocomplete is used for the autosuggestion when typing, the search is done by appending "title__contains=keyword" to the $scope.query and then trigger the query_api function.
If you want to change the behavior of the top page search bar then is you have to modify the html in base.html https://github.com/GeoNode/geonode/blob/master/geonode/templates/base.html#L74, but that is a pure html form.
Hope this helps
2015-08-27 7:38 GMT+02:00 Häfliger Guido <guido.haefliger at vogelwarte.ch<mailto:guido.haefliger at vogelwarte.ch>>:
Hello
We test geonode to manage our metadata (version 2.4b25). Is it possible to extend the text search to other attribute fields? For the moment the text search only use the layer name. If it is possible, where can I configure it?
Regards
Guido
____________________________________________________
Dipl. Ing. ETH Guido Häfliger
EDV/GIS-Spezialist
Tel. ++41 41 462 97 60<tel:%2B%2B41%2041%20462%2097%2060>
guido.haefliger at vogelwarte.ch<mailto:guido.haefliger at vogelwarte.ch>
www.vogelwarte.ch<http://www.vogelwarte.ch>
Schweizerische Vogelwarte | Seerose 1 | CH-6204 Sempach | Schweiz
_______________________________________________
geonode-users mailing list
geonode-users at lists.osgeo.org<mailto:geonode-users at lists.osgeo.org>
http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
--
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150827/d7f94a32/attachment-0001.html>
More information about the geonode-users
mailing list