Generate RSS feed from a given node in a multi domain site
Hi Guys,
I've done a pretty thorough search on the forum & can't find anything on this - so forgive me if this is already out there.
I have a multi site installation with 5 domains/sites and need to generate an rss feed from a given node within each site.
So effctively I'll have RSS feeds from 5 domains. I've had issues with getting this working when more than 1 domain is asociated with the Umbraco installation. Has anybody done anything similar?
To break it down, It is a website for a small group of recruitment companies & all of which require an RSS feed for advertised jobs.
ok - for starters I wasn't generating the RSS using the XSLT for each node.
XSLT is something I'm not too familiar with, so I'd appreciate if anyone can point me at any directions on how to setup the XSLT snippet in V4 to actively generate an RSS feed from content produced under a specific node. I can't seem to find any directions anywhere on this subject.
This method should work perfectly under a multi domain site, I'm assuming?
What do you want to create the feed over? From the given node, and all of the underlying nodes? Or the whole site where the node is in?
I have a script that takes the current node, and creates a RSS-feed from all of the underlying nodes. This means that if you stand on the frontpage, you will get a feed over the whole page. If you stand on a level 4-node, you'll get a feed over level 5,6,7 etc., under that node. So actually it's possible to get a different feed on every page of your site, wich makes it pretty flexible. But is this what you are searching for?
I have 4 Home page nodes for 4 separate domains & under that I have an employment node. I'm wanting to generate the RSS from this employment node on each of the 4 domains. i.e. www.domain1.com/domain1rss.xml, www.domain2.com/domain2rss.xml, www.domain3.com/domain3rss.xml, www.domain4.com/domain4rss.xml.
Umbraco has everything to accomplish your mission, basically you want to use a macro based on the "List Sub Pages From A Changable Source" template and change it to fit the rss specification, create an empty page with template, put your macro in there and reference the feed in your employment page.
Since my timetable is very tight today, i have no time to wrap it in a package right now, but if you're not that desperate, i'll try tonight.
I used this piece of code to put a true/false property on every page. When the checkbox was checked, then the page wouldn't be included in the RSS-feed.
Does it work, if you remove that piece of code Simon?
</xsl:for-each> </news> </xsl:variable> <!-- SORTING BY DATE END -->
<!-- start writing XSLT --> <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/> <rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title> Trades and Labour Hire </title> <link>http://<xsl:value-of select="umbraco.library:RequestServerVariables('SERVER_NAME')" /><xsl:value-of select="umbraco.library:NiceUrl($currentPage/@id)"/> </link> <description> RSS feed for Trades and Labour Hire job positions </description>
It looks like $sort is empty. Could you write out the variable, and sees what it contains?
And just to be sure. You do type in the url to the feed like this right: www.yourdomain.com?alttempalte=rssfeed or www.yourdomain.com/rssfeed.aspx (if your template is called rssfeed)
Generate RSS feed from a given node in a multi domain site
Hi Guys,
I've done a pretty thorough search on the forum & can't find anything on this - so forgive me if this is already out there.
I have a multi site installation with 5 domains/sites and need to generate an rss feed from a given node within each site.
So effctively I'll have RSS feeds from 5 domains. I've had issues with getting this working when more than 1 domain is asociated with the Umbraco installation. Has anybody done anything similar?
To break it down, It is a website for a small group of recruitment companies & all of which require an RSS feed for advertised jobs.
I'd appreciate any assistance.
Thanks
What's the specific problem? I have RSS Feeds on several multi-language sites... :)
Hmmm...
ok - for starters I wasn't generating the RSS using the XSLT for each node.
XSLT is something I'm not too familiar with, so I'd appreciate if anyone can point me at any directions on how to setup the XSLT snippet in V4 to actively generate an RSS feed from content produced under a specific node. I can't seem to find any directions anywhere on this subject.
This method should work perfectly under a multi domain site, I'm assuming?
Thanks Guys.
What do you want to create the feed over? From the given node, and all of the underlying nodes? Or the whole site where the node is in?
I have a script that takes the current node, and creates a RSS-feed from all of the underlying nodes. This means that if you stand on the frontpage, you will get a feed over the whole page. If you stand on a level 4-node, you'll get a feed over level 5,6,7 etc., under that node. So actually it's possible to get a different feed on every page of your site, wich makes it pretty flexible. But is this what you are searching for?
Hi Kim,
Sounds like it may be, yes.
I have 4 Home page nodes for 4 separate domains & under that I have an employment node. I'm wanting to generate the RSS from this employment node on each of the 4 domains. i.e. www.domain1.com/domain1rss.xml, www.domain2.com/domain2rss.xml, www.domain3.com/domain3rss.xml, www.domain4.com/domain4rss.xml.
would that work effectively for this scenario?
Thanks
I should have said I'm wanting to generate the RSS from everything UNDER this employment node
Please? Any assistance with this one? I'd be truly appreciative :)
Umbraco has everything to accomplish your mission, basically you want to use a macro based on the "List Sub Pages From A Changable Source" template and change it to fit the rss specification, create an empty page with template, put your macro in there and reference the feed in your employment page.
Since my timetable is very tight today, i have no time to wrap it in a package right now, but if you're not that desperate, i'll try tonight.
Cheers,
André
Ahh sorry sritchie, I totaly forgot about this post.
We did something like this earlier:
1. Create a XSLT macro, and in the XSLT-file copy the belov code in:
This code includes every page that has a tempalte, with an ID of 1092. If you just want every pages in your site, remove the
In the first for-each.
2. Create a new template, and call it something like 'rssfeed'.
In the 'rssfeed'-tempalte copy the belov code:
Remember to include the right macro. In my case my macro was called 'rssFeed', as you can see.
Now you should be able to see your rss-feed if you type in an alttemplate in the url. Like this: www.domain1.com?alttemplate=rssfeed
Hope this works for you, otherwise say so...
Thanks Guys :)
Much appreciated - I'll give this a go & let you know how I go.
Simon.
OK,
There is an RSS being generated from the alttemplate - but it is currently still empty.
I have nominated the template id of the template utilised for the RSS,
I know I'm missing something small but can't seem to see what else I need to customise.
Thanks Kim
Simon
Maybe you could try removing this:
[data[@alias='hideInFeed'] != '1']
from the first <xsl:for-each>.
I used this piece of code to put a true/false property on every page. When the checkbox was checked, then the page wouldn't be included in the RSS-feed.
Does it work, if you remove that piece of code Simon?
Did it work Simon?
Sorry Kim,
I had been side swiped with some other work.
I was able to get an RSS feed but it was still empty - I'll focus on it again this week
Thanks for the help
Simon
Hi there Kim,
A Little odd, but as before I do have an RSS but it is empty,
see my code below - as modified from the code you put up:
Not sure whats happening here - any ideas?
And you do have some nodes that uses a tempate with an id of 1271 right?
Yep - definately got 3 which should be appearing from what I can see
Hmm....What does the source-code of the outputted RSS contain. I mean could you post the source from the rss-feed?
Sure
Its completely empty as you can see
<title>
<link>http://xxxxx.xxxx.net.au?alttemplate=RSSFEEDTLH
<description>
</channel></rss>
It looks like $sort is empty. Could you write out the variable, and sees what it contains?
And just to be sure. You do type in the url to the feed like this right: www.yourdomain.com?alttempalte=rssfeed or www.yourdomain.com/rssfeed.aspx (if your template is called rssfeed)
Ok, I do feel a bit like a tool now - I was only typing the top level domain, instead of down to the sub level that I wanted.
All working now. Briliant.
Thanks Kim, you were a great help.
Simon
Great Simon :)
Glad I could help. Remember to mark this post as answered.
is working on a reply...