mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00: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 {
|
class RSSWidget extends Widget {
|
||||||
static $db = array(
|
static $db = array(
|
||||||
"Title" => "Text",
|
"RSSTitle" => "Text",
|
||||||
"RssUrl" => "Text",
|
"RssUrl" => "Text",
|
||||||
"NumberToShow" => "Int",
|
"NumberToShow" => "Int"
|
||||||
);
|
);
|
||||||
|
|
||||||
static $defaults = array(
|
static $defaults = array(
|
||||||
"NumberToShow" => 10,
|
"NumberToShow" => 10,
|
||||||
"Title" => 'RSS Feed'
|
"RSSTitle" => 'RSS Feed'
|
||||||
);
|
);
|
||||||
static $cmsTitle = "RSS Feed";
|
static $cmsTitle = "RSS Feed";
|
||||||
static $description = "Shows the latest entries of a RSS feed.";
|
static $description = "Shows the latest entries of a RSS feed.";
|
||||||
|
|
||||||
function getCMSFields() {
|
function getCMSFields() {
|
||||||
return new FieldSet(
|
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 TextField("RssUrl", _t('RSSWidget.URL', "URL of RSS Feed")),
|
||||||
new NumericField("NumberToShow", _t('RSSWidget.NTS', "Number of Items to show"))
|
new NumericField("NumberToShow", _t('RSSWidget.NTS', "Number of Items to show"))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
function Title() {
|
||||||
|
return ($this->RSSTitle) ? $this->RSSTitle : 'RSS Feed';
|
||||||
|
}
|
||||||
|
|
||||||
function FeedItems() {
|
function FeedItems() {
|
||||||
$output = new DataObjectSet();
|
$output = new DataObjectSet();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user