[ckan-dev] Allow tagcloud on Czech CKAN

David Read david.read at okfn.org
Tue Oct 4 16:04:41 UTC 2011


2011/10/4 Ondřej Vadinský <ondrej.vadinsky at vse.cz>

> Dne úterý 04 října 2011 11.39:19, David Read napsal(a):
> > 2011/10/3 Ond�ej Vadinsk� <ondrej.vadinsky at vse.cz>
> >
> > > Hello,
> > >
> > > we would like to have a tagcloud displayed on Czech CKAN homepage. From
> > > what I
> > > read on the wiki [1] and documentation [2] and from what I've seen in
> > > index.html template, it should be there, but it is not generated. Could
> > > you suggest what is wrong?
> >
> > Hi Ondrej,
> >
> > I love the tag cloud and would love to see it on more CKAN's!
> >
> > I'm afraid the wiki on this [1] got a bit mangled, which I've corrected
> now.
> > There are two snippets of code needed for the tag cloud and you have only
> > got the first one on the page. So simply add in the bit that starts:
> <py:if
> > test="len(c.facets.get('tags', {}))">
> >
> > Do let us know if that does the trick. Cheers,
> >
> > David
>
> Hello, David,
>
> there already is that snippet in the index.html template
> (/etc/ckan/cz/pyenv/src/ckan/ckan/templates) and it is not working.
> Speaking
> of which, is that relevant path for czech ckan?
>

Yes this is the correct path.

After a bit of digging around, it seems that this particular implementation
of the tag cloud relies on Solr as the search back-end. The default for CKAN
(until the next release - 1.5) is to use Postgres full-text
search. (c.facets always comes back empty.)

So I've switched cz.ckan.net to use SOLR and the tag cloud now appears!
http://cz.ckan.net/

David


> Regards,
> Ondřej Vadinský
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20111004/52d629c3/attachment-0001.html>


More information about the ckan-dev mailing list