mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
Removed custom title and method in favour of using defaults
This commit is contained in:
parent
99b3127e70
commit
293dd54f64
@ -2,22 +2,21 @@
|
|||||||
|
|
||||||
class RSSWidget extends Widget {
|
class RSSWidget extends Widget {
|
||||||
static $db = array(
|
static $db = array(
|
||||||
"CustomTitle" => "Text",
|
"Title" => "Text",
|
||||||
"RssUrl" => "Text",
|
"RssUrl" => "Text",
|
||||||
"NumberToShow" => "Int",
|
"NumberToShow" => "Int",
|
||||||
);
|
);
|
||||||
|
|
||||||
static $defaults = array(
|
static $defaults = array(
|
||||||
"NumberToShow" => 10
|
"NumberToShow" => 10,
|
||||||
|
"Title" => 'RSS Feed'
|
||||||
);
|
);
|
||||||
|
|
||||||
static $title = "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("CustomTitle", _t('RSSWidget.CT', "Custom title for the feed")),
|
new TextField("Title", _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"))
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user