Tagcloud Plugin

All you have todo is adding the following in the config.xml of your collection:


<?xml version="1.0"?>
<bxcms xmlns="http://bitflux.org/config">

<plugins>
<parameter name="xslt" type="pipeline" value="tagcloud.xsl"/>
<plugin type="navitree">
</plugin>
<plugin type="tagcloud">
<parameter name="locations" value="/blog/"/>
<parameter name="maxfontsize" value="56"/>
<parameter name="minfontsize" value="20"/>
</plugin>
</plugins>
</bxcms>

and a little xsl to display the data:


<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:blog="http://bitflux.org/doctypes/blog" xmlns:bxf="http://bitflux.org/functions" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" xmlns:php="http://php.net/xsl" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rss="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" exclude-result-prefixes="xhtml">
<xsl:import href="master.xsl"/>
<xsl:import href="../standard/common.xsl"/>

<xsl:output encoding="utf-8" method="xml" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"/>

<xsl:template name="content">
<p id="tagcloud">
<xsl:for-each select="/bx/plugin[@name='tagcloud']/tagcloud/tag">
<a href="{$webrootW}{path}archive/tag/{name}" style="font-size:{size}px;">
<xsl:value-of select="name"/>
</a>&#160;
</xsl:for-each>
</p>
</xsl:template>

</xsl:stylesheet>

have fun :)
Related Entries:
Make private post got more useful
rel="bookmark" added to permalinks
Problems with FCKEditor and Firefox 1.0
Freeflux.net upgraded to Flux CMS 1.5 branch
cocomment enabling your blog with Flux CMS 1.4 and later
Comments (5)  Permalink

Comments

Mat @ 01.02.2007 11:46 CEST
Perfect! But how I put this tagcloud in the right sidebar with the blog?
chregu @ 01.02.2007 12:17 CEST
Not possible out of the box (and i don't know a short solution either...)
leo @ 02.02.2007 12:51 CEST
Like it! Is quite fun!
Reto @ 22.02.2007 09:19 CEST
A bit dumb concerning xml/xsl I'm asking myself where to put the second snippet ...
Reto @ 22.02.2007 09:36 CEST
I was able to work it out: I just had to create a tagcloud.xsl in my theme ...

Nice!

add a comment

This blog is gravatar enabled.
Your email adress will never be published.
Comment spam will be deleted!

Name*
E-Mail
For Spammers Only
URL
Comment*
Notify me via E-Mail when new comments are made to this entry
Remember me (needs cookies)