[GeoNode-users] text search question

Simone Dalmasso simone.dalmasso at gmail.com
Fri Aug 28 02:31:09 PDT 2015


Hi, the templates must not be i the static folder or subfolders. There is
not a guide to develop on GeoNode because Geonode is Django based and you
can refer to the django tutorials and documentation to understand the basic
architecture. https://docs.djangoproject.com/en/1.6/
 You should follow what is already there as architecture, like where to
add/modify templates and js, no need to create other folders.

2015-08-27 17:18 GMT+02:00 Häfliger Guido <guido.haefliger at vogelwarte.ch>:

> 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 <guido.haefliger at vogelwarte.ch>*
> *www.vogelwarte.ch <http://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>:
>
> 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
>
>
>
> *guido.haefliger at vogelwarte.ch <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
> http://lists.osgeo.org/cgi-bin/mailman/listinfo/geonode-users
>
>
>
>
>
> --
>
> Simone
>



-- 
Simone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geonode-users/attachments/20150828/c2603488/attachment.html>


More information about the geonode-users mailing list