How do I get the xslt to look for all nodes at the same level as itself and add them to the feed?
I've done this on another site, but all my select statements seem to be drawing a blank.. I thought the following would work as it did on a previous site, but I don't kow why:
<!-- Update these variables to modify the feed --> <xsl:variable name="RSSNoItems" select="string('200')"/> <xsl:variable name="RSSTitle" select="string($currentPage/feedTitle)"/> <xsl:variable name="SiteURL" select="concat('http://',umbraco.library:RequestServerVariables('HTTP_HOST'))"/> <xsl:variable name="RSSDescription" select="string($currentPage/feedDescription)"/> <xsl:variable name="RSSPicture" select="string('/media/1003/logo.jpg')"/>
<!-- 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="$currentPage/* [@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')"/>
Tweaking the default RSS feed
I'm using the built in RSS feed for 6.2.1.
It works fine if I stick all my news items as child nodes of the RSS feed, but I'd like it to store the RSS page at the same level as the news item.
Home
-News
-RSS Feed
-News item1
-News item 2
-News item 3
So my question is this:
How do I get the xslt to look for all nodes at the same level as itself and add them to the feed?
I've done this on another site, but all my select statements seem to be drawing a blank.. I thought the following would work as it did on a previous site, but I don't kow why:
The showinrss code is a tick box to tell the feed not to show itself in the list.
Thanks in advance,
Tom
Full code below:
Sorted it!
The xsl template I used instead:
Thanks to this thread - http://our.umbraco.org/forum/developers/xslt/15918-Getting-nodes-on-the-same-level-including-the-nodes-above-$currentPage
is working on a reply...