[ckan-dev] Custom Search Facets
Rachel Knowler
rachel.knowler at liip.ch
Tue Oct 28 08:12:32 UTC 2014
Hi Renato,
To add a custom facet search you have to implement the iFacets interface
in your plugin. This is described in the documentation here:
http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IFacets.
I recently did this and you can see my code for it here:
https://github.com/openresearchdata/ckanext-ord-hierarchy/blob/master/ckanext/ord_hierarchy/plugin.py#L210.
Hope that helps!
- Rachel
On 27.10.2014 16:02, Renato Guevara wrote:
> I was able to successfully add a custom field to my dataset. In fact,
> it was a vocabulary with its corresponding tags. However, now, I'm
> looking into adding a custom facet search for this specific custom
> field. In this case, the name of my custom field is queryLanguage. I
> looked through the forum and documentation to see if there were any
> tutorials but I couldn't find any. Would someone be able to point me
> in the right direction. Again, I'm trying to add a custom facet
> search like there is on the default Dataset search page on the left
> side. Right now, the default ones are "Publishers", "Subjects",
> "Organizations", "Groups", "Tags", "Formats", and "Licenses". I'd like
> to add "Query Languages".
>
> Thanks,
>
> Renato Guevara
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
--
Liip AG // Limmatstrasse 183 // CH-8005 Zürich
Tel +41 43 500 39 80 // Mob +41 78 658 26 12 // www.liip.ch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20141028/c9478363/attachment-0003.html>
More information about the ckan-dev
mailing list