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
Hi.
I have the following structure:
Blog - post1 - post2 - post3
When I now add another post under Blog I would like to take that post and present it on the Blog page.
So the latest post under blog is always presented on Blog.
thanks!
Hi Daniel
Do you have some code already?
You probably need to run through the nodes to see which one is the newest one. Something like this should work I think:
<xsl:for-each select="$currentPage/*[@isDoc]"> <xsl:sort data-type="text" select="@createDate" order="descending" /> <xsl:if test="position() = '1'"> <a href="{umbraco.library:NiceUrl(@id)}"><xls:value-of select="@nodeName" /></a> </xsl:if></xsl:for-each>
I think something like the above code should do the work...
/Kim A
If you want all of the general blog-like functionality in addition you could also just use one of the blog packages: http://our.umbraco.org/projects/collaboration/blog-4-umbraco
Is there a way to do this in .NET and not in XSLT ?
Not that I couldn't implement it in XSLT but just curious to know if it's possible.
thanks
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Get latest page under another page
Hi.
I have the following structure:
Blog
- post1
- post2
- post3
When I now add another post under Blog I would like to take that post and present it on the Blog page.
So the latest post under blog is always presented on Blog.
thanks!
Hi Daniel
Do you have some code already?
You probably need to run through the nodes to see which one is the newest one. Something like this should work I think:
I think something like the above code should do the work...
/Kim A
If you want all of the general blog-like functionality in addition you could also just use one of the blog packages: http://our.umbraco.org/projects/collaboration/blog-4-umbraco
Is there a way to do this in .NET and not in XSLT ?
Not that I couldn't implement it in XSLT but just curious to know if it's possible.
thanks
is working on a reply...