How to display the latest Blog Post (blog 4 umbraco) on homepage of website?
How can I Display the latest Blog Post from my blog on the front page of my website? I can't seem to get it working, I can display all of the posts but not the most recent one...
This xslt is the very code I need for the same reason Evan noted. However, using the StarterKit Blog and 4.6.1, it doesn't work. What changes should I make to get it working?
Try creating a <textarea><xsl:copy-of select="$currentPage/ancestor-or-self::root//node [@nodeTypeAlias='BlogPost']" /></textarea> - does this return any XML at all?
I guess there perhaps is a problem with your match...
How to display the latest Blog Post (blog 4 umbraco) on homepage of website?
How can I Display the latest Blog Post from my blog on the front page of my website? I can't seem to get it working, I can display all of the posts but not the most recent one...
This is what I use to list the latest 3 blog posts. Of course you can change 3 to 1 ;)
Great, thank for the response! worked like a charm
This xslt is the very code I need for the same reason Evan noted. However, using the StarterKit Blog and 4.6.1, it doesn't work. What changes should I make to get it working?
Thanks!
It seems that this line:
<xsl:for-each select="$currentPage/ancestor-or-self::root//node [@nodeTypeAlias='BlogPost']">
Is failing to match anything. I do, however, have a doc type with an alias "BlogPost", what should I do?
Hi Kyle
Try creating a <textarea><xsl:copy-of select="$currentPage/ancestor-or-self::root//node [@nodeTypeAlias='BlogPost']" /></textarea> - does this return any XML at all?
I guess there perhaps is a problem with your match...
/Jan
Hi Kyle.
There's probably no match because this XSLT is meant to be used with the legacy XML schema. Try this instead:
<xsl:for-each select="$currentPage/ancestor-or-self::root//BlogPost">
Does that help?
/Kim A
Kim: did the trick; thanks!
Great to hear Kyle - You're welcome. I'm glad you got it working :)
Have a nice day!
/Kim A
D'oh! I obviously have not been fully waken when I answered earlier. You rock Kim! :-)
/Jan
is working on a reply...