mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
now I see why you need that title function. So added it back
This commit is contained in:
parent
293dd54f64
commit
9da8415588
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user