diff --git a/code/TagCloudWidget.php b/code/TagCloudWidget.php index 29f35da..0664674 100644 --- a/code/TagCloudWidget.php +++ b/code/TagCloudWidget.php @@ -2,16 +2,17 @@ class TagCloudWidget extends Widget { static $db = array( + "Title" => "Varchar", "Limit" => "Int", "Sortby" => "Varchar" ); static $defaults = array( + "Title" => "Tag Cloud", "Limit" => "0", "Sortby" => "alphabet" ); - static $title = "Tag Cloud"; static $cmsTitle = "Tag Cloud"; static $description = "Shows a tag cloud of tags on your blog."; @@ -30,11 +31,16 @@ class TagCloudWidget extends Widget { function getCMSFields() { return new FieldSet( + new TextField("Title", _t("TagCloudWidget.TILE", "Title")), new TextField("Limit", _t("TagCloudWidget.LIMIT", "Limit number of tags")), new OptionsetField("Sortby",_t("TagCloudWidget.SORTBY","Sort by"),array("alphabet"=>_t("TagCloudWidget.SBAL", "alphabet"),"frequency"=>_t("TagCloudWidget.SBFREQ", "frequency"))) ); } + function Title() { + return $this->Title ? $this->Title : 'Tag Cloud'; + } + function Tags() { Requirements::css("blog/css/tagcloud.css");