mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
95eb0d2c38
Fixed RSS Link, using 'rss' as $action param for Link() method on BlogHolder. This fixes the rss url when removing trailing slashes from page urls
32 lines
645 B
PHP
32 lines
645 B
PHP
<?php
|
|
|
|
/**
|
|
* A simple widget that just shows a link
|
|
* to this website's blog RSS, with an RSS
|
|
* icon.
|
|
*
|
|
* @package blog
|
|
*/
|
|
class SubscribeRSSWidget extends Widget {
|
|
|
|
static $title = 'Subscribe via RSS';
|
|
|
|
static $cmsTitle = 'Subscribe via RSS widget';
|
|
|
|
static $description = 'Shows a link allowing a user to subscribe to this blog via RSS.';
|
|
|
|
/**
|
|
* Return an absolute URL based on the BlogHolder
|
|
* that this widget is located on.
|
|
*
|
|
* @return string
|
|
*/
|
|
function getRSSLink() {
|
|
Requirements::themedCSS('subscribersswidget');
|
|
$container = BlogTree::current();
|
|
if ($container) return $container->Link('rss');
|
|
}
|
|
}
|
|
|
|
?>
|