View Source

<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[{zone-template-instance:ZFPROP:Proposal Zone Template}


[Ben Scholzen|]


1.0 - 21 November 2008: Initial Draft.
1.0 - 22 November 2008: Refactored to Zend_TagCloud.

Zend_TagCloud is a simple component to create tag clouds from a simple array list of tags.

* [Tag Cloud calculation|]

* This component *will not* limit the output to HTML.
* This component *will* allow any kind of HTML output by default.
* This component *will* let the user define the separator between the tags.
* This component *will* allow to specify the min- and max-fontsize.
* This component *will* allow to specify the unit for the fontsize.
* This component *will* alternatively support a list of classes instead of fontsizes.

* Zend_Exception

Zend_TagCloud is instantiated with an options array or Zend_Config object. You should at least supply an array of tags for the tag cloud to ronder. After that, you can call the $tagCloud->render() method or simply do "echo $tagCloud" via the magic __toString() method (not implemented in the prototype yet).

* Milestone 1: [DONE] Working prototype checked into user branch (
* Milestone 2: Component is approved
* Milestone 3: Working prototype checked into the incubator
* Milestone 4: Unit tests exist, work, and are checked into SVN.
* Milestone 5: Initial documentation exists.

* Zend_TagCloud
* Zend_TagCloud_Exception
* Zend_TagCloud_Decorator_Exception
* Zend_TagCloud_Decorator_Cloud
* Zend_TagCloud_Decorator_Tag
* Zend_TagCloud_Decorator_HtmlCloud
* Zend_TagCloud_Decorator_HtmlTag


$tags = array(
array('title' => 'Tag 1',
'weight' => 50,
'url' => '/tag/1'),
array('title' => 'Tag 2',
'weight' => 20,
'url' => '/tag/2'),
array('title' => 'Tag 3',
'weight' => 34,
'url' => '/tag/3'),

$cloud = new Zend_TagCloud(array('tags' => $tags));
echo $cloud;

Too much, see prototype: