mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Update 02_RSSFeed.md
Change file name to PageController to match code. Change example code to use parameter in `Link()` method rather than using concatenation
This commit is contained in:
parent
5243ec2179
commit
abe76e9b29
@ -55,7 +55,7 @@ RSSFeed::linkToFeed($link, $title);
|
||||
You can use [RSSFeed](api:SilverStripe\Control\RSS\RSSFeed) to easily create a feed showing your latest Page updates. The following example adds a page
|
||||
`/home/rss/` which displays an XML file the latest updated pages.
|
||||
|
||||
**app/code/Page.php**
|
||||
**app/code/PageController.php**
|
||||
|
||||
```php
|
||||
use SilverStripe\Control\RSS\RSSFeed;
|
||||
@ -71,7 +71,7 @@ class PageController extends ContentController
|
||||
{
|
||||
parent::init();
|
||||
|
||||
RSSFeed::linkToFeed($this->Link() . "rss", "10 Most Recently Updated Pages");
|
||||
RSSFeed::linkToFeed($this->Link("rss"), "10 Most Recently Updated Pages");
|
||||
}
|
||||
|
||||
public function rss()
|
||||
|
Loading…
x
Reference in New Issue
Block a user