I am gettnig an RSS auto-detect on every page of my site. The little orange RSS icon in my address bar in Firefox. But when I click on it, I get a Page not Found error (RSS.aspx). What's with that? What exactly is Supposed to happen when I click on this? What am I supposed to be subscribing to? How to I configure/implement RSS feeds in Umbraco?
The purpoe of the button in your browser is to display any feed(s) that you have generated from your site content. So, if you have someting like this in your <head> tag:
I have a page, called RSS.aspx, which uses the RSS template. Inside this template, I have the following Macro:
<umbraco:Macro rssNoItems="10" rssTitle="GTP News" rssDescription="This is a list of Your Company's news and events that are going on." Alias="NewsRSS" runat="server"></umbraco:Macro>
The "NewsRSS" template uses the NewsRSS.xslt file, whose loop looks like the following:
You don't have to have a node in the content section that is called RSS. There's a neat little trick that Umbraco does: if it can't find the node that you're trying to access, it looks in the Templates section to see if there's a template with that same name.
My RSS template looks like this (careful, do not start the "<umbraco:Macro" part on a new line, it will invalidate the XML:
I've customized the XSLT file for my RSS feed, but you should be able to use it directly (maybe I should make a package for this..) The DocumentType for your blog should be called "Blog" Anything under a node with the DocumentType of Blog will appear in your RSS feed (you can change the blogRoot variable if you called yours something else).
Plus the way the dates are formated will cause different feed readers to read the data differently. I will look at solutions for these and post an updated XSLT file. Thanks, /L
RSS Feed(s)
I am gettnig an RSS auto-detect on every page of my site. The little orange RSS icon in my address bar in Firefox. But when I click on it, I get a Page not Found error (RSS.aspx). What's with that? What exactly is Supposed to happen when I click on this? What am I supposed to be subscribing to? How to I configure/implement RSS feeds in Umbraco?
Thanks,
Garrett
I think the RSS.aspx is something that must've come with Blog4Umbraco or CWS.
If you had a template called RSS, this would be called when getting RSS.aspx. Do you still have the RSSFeed XSLT file?
The purpoe of the button in your browser is to display any feed(s) that you have generated from your site content. So, if you have someting like this in your <head> tag:
Than that would be "activating" the RSS icon.
HTH,
Nik
Yes, I have the RSS XSLT, as well as the template. Do I need to create a page which utilizes this template in order to make it work?
That is correct. Whatever the URL is of the page that holds your valid RSS 2.0 or Atom feed, is what you would then specify in the header link tag.
It's still not working.
I have a page, called RSS.aspx, which uses the RSS template. Inside this template, I have the following Macro:
The "NewsRSS" template uses the NewsRSS.xslt file, whose loop looks like the following:
Because I want everything nuder the current page. However, when I browse to RSS.aspx, nothing shows up in the feed. What am I doing wrong?
Thanks again,
Garrett
You don't have to have a node in the content section that is called RSS. There's a neat little trick that Umbraco does: if it can't find the node that you're trying to access, it looks in the Templates section to see if there's a template with that same name.
My RSS template looks like this (careful, do not start the "<umbraco:Macro" part on a new line, it will invalidate the XML:
I've customized the XSLT file for my RSS feed, but you should be able to use it directly (maybe I should make a package for this..) The DocumentType for your blog should be called "Blog" Anything under a node with the DocumentType of Blog will appear in your RSS feed (you can change the blogRoot variable if you called yours something else).
Doing this will surely create a validation error, as there are 3 lines of whitespace before the macro?
This seems to be something which happens when you output using masterpages.
You should be able to eliminate those be removing the linebreaks in the masterpage/xslt file.
Yes, it's why I stuck the asp:content and the umbraco:macro together on one line. There's absolutely no whitespacing at the top of my rss feed.
Ah simple! :) Good to have it documented in the thread though :)
Also
xmlns:rssdatehelper="urn:rssdatehelper"
Will cause a validation issue as that isn't a valid urn.
Plus the way the dates are formated will cause different feed readers to read the data differently. I will look at solutions for these and post an updated XSLT file. Thanks, /L
Doesn't this do the job?
umbraco.library:FormatDateTime(@createDate,'r')
I ssem to remember that formats it correctly, like 2010-05-26T12:00:00
Yep, that format is not RFC822 ;) The correct format looks like below;
Just looked at the source, and my previous sample should actually output just that. I remembered wrong before.
The extenstion is implemented like this:
And the DateTime.ToString("r") should give you the correct format.
Are you experiencing something else?
to LaurenceG,
to make get rid of the - xmlns:rssdatehelper="urn:rssdatehelper"
you can add it to the top of the stylesheet declaration:
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltStrings BlogLibrary rssdatehelper"
hope this helps...
is working on a reply...