Weighted category cloud

2014-04-28 18:26

Keywords: category, tag, cloud, link

They are fortunately outdated now, but if you feel old-fashioned, here it is:

Help , Hope for the Future , Meaningful Labor , Plugins , Reciprocal Affection , Textpattern , Tips

Code

<txp:etc_query wraptag="p" break=","
	data="SELECT cat, title, COUNT(*) count
	FROM (SELECT Category1 cat FROM textpattern WHERE Status=4
	UNION ALL
	SELECT Category2 cat FROM textpattern WHERE Status=4) c
	JOIN txp_category ON name=cat WHERE type='article' AND cat>''
	GROUP BY cat ORDER BY title"
>
	<a href='<txp:category name="{cat?}" section="" url="1" />' style="font-size:{$max({count?}|8)./8.min($|3)}em" title="{count?} articles}">{$htmlspecialchars({title?})}</a>
</txp:etc_query>

File(s)