Key is to use the '//' selector (which selects all children - regardless of their level) instead of '/'. Of course, you'll have to take care of setting starting page (used $currentPage) and declaring the variable numberOfItems and set it to whatever number you'd like, and replacing 'forumPostAlias' with alias of a forum post.
Hi I am trying to access the latest forum posts/updates using the xslt extension - uForum:LatestTopics, however I am having problems accessing the variables through xslt. This is what i have so far:
How to display latest posts
How can I make a macro that displays all the latest posts fromm all forums/topics? Just like the Our umbraco mainpage.
Hi Kristian,
It could be something similar to:
Key is to use the '//' selector (which selects all children - regardless of their level) instead of '/'. Of course, you'll have to take care of setting starting page (used $currentPage) and declaring the variable numberOfItems and set it to whatever number you'd like, and replacing 'forumPostAlias' with alias of a forum post.
Hope this helps.
Regards,
/Dirk
You also might have a look at this post: http://our.umbraco.org/forum/developers/xslt/3292-How-to-display-the-latest-Blog-Post-(blog-4-umbraco)-on-homepage-of-website?sort=karma Sebastiaan's solutions works for me...
Forum posts are kept in a database, and not in the node structure, so the above won't work for uForum.
I think there is an XSLT extension for getting all posts. Take a look there.
Hi I am trying to access the latest forum posts/updates using the xslt extension - uForum:LatestTopics, however I am having problems accessing the variables through xslt. This is what i have so far:
<xsl:variable name="utopics" select="uForum:LatestTopics('10')"/>
<xsl:for-each select="$utopics/topics">
<xsl:value-of select="./urlname" disable-output-escaping="yes"/>
<a title="" href="{umbraco.library:NiceUrl(@parentid)}"><xsl:value-of select="./urlname"/></a>
</xsl:for-each>
This is a real stab at what I am hoping to achieve, but is unfortunately not working. Any guider or pointers would be greatly appreciated
thanks
Andrew
I think you need to do this:
<xsl:for-each select="$utopics/topics/topic">
is working on a reply...