mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 09:05:58 +00:00
BUGFIX: Fix rss feed
This commit is contained in:
parent
4c5f0e1075
commit
f636f90fae
@ -239,10 +239,12 @@ class BlogHolder_Controller extends Page_Controller {
|
|||||||
$blogName = $this->Name;
|
$blogName = $this->Name;
|
||||||
$altBlogName = $project . ' blog';
|
$altBlogName = $project . ' blog';
|
||||||
|
|
||||||
$children = $this->Children();
|
$entries = $this->Entries(20);
|
||||||
$children->sort('Date', 'DESC');
|
|
||||||
$rss = new RSSFeed($children, $this->Link(), ($blogName ? $blogName : $altBlogName), "", "Title", "ParsedContent");
|
if($entries) {
|
||||||
$rss->outputToBrowser();
|
$rss = new RSSFeed($entries, $this->Link(), ($blogName ? $blogName : $altBlogName), "", "Title", "ParsedContent");
|
||||||
|
$rss->outputToBrowser();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -305,12 +307,19 @@ class BlogHolder_Controller extends Page_Controller {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(class_exists('TagField')) {
|
||||||
|
$tagfield = new TagField('Tags', null, null, 'BlogEntry');
|
||||||
|
$tagfield->setSeparator(', ');
|
||||||
|
} else {
|
||||||
|
$tagfield = new TextField('Tags');
|
||||||
|
}
|
||||||
|
|
||||||
$fields = new FieldSet(
|
$fields = new FieldSet(
|
||||||
new HiddenField("ID", "ID"),
|
new HiddenField("ID", "ID"),
|
||||||
new TextField("Title",_t('BlogHolder.SJ', "Subject")),
|
new TextField("Title",_t('BlogHolder.SJ', "Subject")),
|
||||||
new TextField("Author",_t('BlogEntry.AU'),$membername),
|
new TextField("Author",_t('BlogEntry.AU'),$membername),
|
||||||
$contentfield,
|
$contentfield,
|
||||||
new TextField("Tags","Tags"),
|
$tagfield,
|
||||||
new LiteralField("Tagsnote"," <label id='tagsnote'>"._t('BlogHolder.TE', "For example: sport, personal, science fiction")."<br/>" .
|
new LiteralField("Tagsnote"," <label id='tagsnote'>"._t('BlogHolder.TE', "For example: sport, personal, science fiction")."<br/>" .
|
||||||
_t('BlogHolder.SPUC', "Please separate tags using commas.")."</label>")
|
_t('BlogHolder.SPUC', "Please separate tags using commas.")."</label>")
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user