now I see why you need that title function. So added it back

This commit is contained in:
Will Rossiter 2008-02-25 08:48:33 +00:00
parent 293dd54f64
commit 9da8415588
1 changed files with 7 additions and 4 deletions

View File

@ -2,25 +2,28 @@
class RSSWidget extends Widget {
static $db = array(
"Title" => "Text",
"RSSTitle" => "Text",
"RssUrl" => "Text",
"NumberToShow" => "Int",
"NumberToShow" => "Int"
);
static $defaults = array(
"NumberToShow" => 10,
"Title" => 'RSS Feed'
"RSSTitle" => 'RSS Feed'
);
static $cmsTitle = "RSS Feed";
static $description = "Shows the latest entries of a RSS feed.";
function getCMSFields() {
return new FieldSet(
new TextField("Title", _t('RSSWidget.CT', "Custom title for the feed")),
new TextField("RSSTitle", _t('RSSWidget.CT', "Custom title for the feed")),
new TextField("RssUrl", _t('RSSWidget.URL', "URL of RSS Feed")),
new NumericField("NumberToShow", _t('RSSWidget.NTS', "Number of Items to show"))
);
}
function Title() {
return ($this->RSSTitle) ? $this->RSSTitle : 'RSS Feed';
}
function FeedItems() {
$output = new DataObjectSet();