Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I want to create a news summary for a umbraco implementation I'm working on with multiple sites. I have a top level global content folder and then multiple sites, and want to be able to create news stories both globally and locally
the problem I'm having is that I am able to list both global and local news for each site, but they appear as separate lists. Is there any way anyone knows of usnig a single xslt to select 'news' content from both the global folder and the local folder within an XSLT, combine both lists, sort according to create date and output a single list
If the news are stored in nodes with a specific doctype it is easy. Just say you have a doc type called "NewsItem" then you can make something like this:
<xsl:for-each select="$currentPage/ancestor-or-self::root/descendant-or-self::node [@nodeTypeAlias = 'NewsItem']"><xsl:sort ....
Thanks for the reply. That would work in one situation, but I have one global content site and many local sites all of which have their own local news that must not be shared The xpath you specified in your foreach would I think select all nodes of that type within all sites, but I only want to pick nodes from the local site and from the global folder
o Global Folders
o Site 1
o Site 2
Site 1 should only see it's news and the global news, and same for site 2
ahh ok, then try something like this one:
<xsl:variable name="SiteNodeName" select="$currentPage/ancestor-or-self::node [@level = 1]/@nodeNamen>">xsl:variable><xsl:for-each select="$currentPage/ancestor-or-self::root/node [@nodeName = 'GlobalFolders' or @nodeName = $SiteNodeName]/descendant-or-self::node [@nodeTypeAlias = 'NewsItem']">xsl:for-each>
Did this work?
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted