Keywords cloud

28 June 2014, 14:42

Keywords: keyword, cloud, tag

There is a bunch of great keywords cloud plugins out there, but I like doing everything myself with my swiss-army toy. Here are the most popular keywords used on this site. Click on a link to see the corresponding articles:

Code

<txp:php>function etc_filter($v) {return ($v>1);}</txp:php>

<txp:etc_query data="SELECT Keywords FROM textpattern WHERE Status=4 AND Keywords>''" break="," name="kwords" />

<txp:etc_query data="{?kwords||do_list.array_count_values.array_filter($|etc_filter).@arsort.json_encode}" break=",">
	<a href="?kw={#}" title="{?} articles">{#}</a>
</txp:etc_query>

<txp:article_custom keywords='<txp:page_url type="kw" />' label='Keyword: <txp:page_url type="kw" />' labeltag="h4" limit="0" />

File(s)