Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Widgets /

Discuss SilverStripe Widgets.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Subscribe RSS Widget on the home page


Go to End


2 Posts   2589 Views

Avatar
Anatol

126 Posts

10 August 2010 at 4:37pm

Edited: 10/08/2010 4:40pm

Hi,

I often use the Blog module for the 'home' (or start) page. In this setup there is a little problem with the SubscribeRSSWidget. Instead of linking to mydomain.com/home/rss (which is the correct link to the rss feed) it links to mydomain.com/rss . If you click on that link all you get is a "Page not found" error.

Here is a simple fix for this problem. In /blog/code/widgets/SubscribeRSSWidget.php add the following line in green to RSSLink():

function RSSLink() {
	Requirements::themedCSS('subscribersswidget');
	$container = BlogTree::current();
	if ($container && $container->Link() == '/') return '/home/rss';
	if ($container) return $container->Link() . 'rss';
}

It would be good if this or a similar fix could be added to the widget. To me a blog on the home page seems to be a quite common setup.

Cheers!
Anatol

Avatar
Willr

Forum Moderator, 5523 Posts

10 August 2010 at 4:59pm

See this wiki page for how to submit code enhancements / patches. Things like this fix would be good to get into core as like you said its quite a common setup and a pretty simple fix.

http://doc.silverstripe.org/contributing#submitting_patches