Ok i know the solution for this is likely very simple, and i couldnt seem to find a solution after searching around so here goes:
I see the general trend is to create an rss feed for each document type, like news, articles, announcements, events etc. But that would be overkill on my site, and i want a feed that can show entries for two different document types at the same time.
I am using the bog standard RSS feed template built into umbraco, i have pasted the code in below which works just fine, but like i said, needs to support one or more document types:
<xsl:param name="currentPage"/>
<!-- Update these variables to modify the feed --> <xsl:variable name="RSSNoItems" select="string('10')"/> <xsl:variable name="RSSTitle" select="string('cuvkbh.dk')"/> <xsl:variable name="SiteURL" select="string('http://www.cuvkbh.dk')"/> <xsl:variable name="RSSDescription" select="string('Seneste nyheder og aktiviteter')"/> <xsl:variable name="rootNode" select="umbraco.library:GetXmlNodeById(1048)"/>
<!-- This gets all news and events and orders by updateDate to use for the pubDate in RSS feed --> <xsl:variable name="pubDate"> <xsl:for-each select="$rootNode/* [@isDoc]"> <xsl:sort select="@createDate" data-type="text" order="descending" /> <xsl:if test="position() = 1"> <xsl:value-of select="updateDate" /> </xsl:if> </xsl:for-each> </xsl:variable>
<xsl:template match="/"> <!-- change the mimetype for the current page to xml --> <xsl:value-of select="umbraco.library:ChangeContentType('text/xml')"/>
RSS Feeds and multiple document types
Ok i know the solution for this is likely very simple, and i couldnt seem to find a solution after searching around so here goes:
I see the general trend is to create an rss feed for each document type, like news, articles, announcements, events etc. But that would be overkill on my site, and i want a feed that can show entries for two different document types at the same time.
I am using the bog standard RSS feed template built into umbraco, i have pasted the code in below which works just fine, but like i said, needs to support one or more document types:
I apologize in advance, just one quick bump as i am sure it's a quick fix.
Final bump.
is working on a reply...