silverstripe-blog/code/widgets/SubscribeRSSWidget.php
Ingo Schommer e33881615d Merge remote-tracking branch 'origin/0.6'
Conflicts:
	.travis.yml
	README.md
	_config.php
	code/BlogHolder.php
	code/BlogTree.php
	code/widgets/ArchiveWidget.php
	code/widgets/BlogManagementWidget.php
	code/widgets/BlogTreeExtension.php
	code/widgets/RSSWidget.php
	code/widgets/SubscribeRSSWidget.php
	composer.json
2013-04-29 09:26:41 +02:00

31 lines
718 B
PHP

<?php
if(class_exists('Widget')) {
/**
* A simple widget that just shows a link
* to this website's blog RSS, with an RSS
* icon.
*
* @package blog
*/
class SubscribeRSSWidget extends Widget {
private static $title = 'Subscribe via RSS';
private static $cmsTitle = 'Subscribe via RSS widget';
private 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');
}
}
}