Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Pavel Gutin 12 posts 32 karma points
    Aug 15, 2011 @ 00:26
    Pavel Gutin
    0

    Display all the blog posts from the business starter kit

    I am learning my way around Umbraco, but I've been stuck on one particular issue. I would like to show the list of all the blog posts in the sidebar, and I am pretty sure that just fixing the following XSLT will do the trick.  

    <xsl:for-each select="$currentPage/umbBlog//umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">

    This returns the list of the all blogs posts when I on the homepage of the site, but not on any of the child pages. Is there a way to fix this?

  • Lee Kelleher 4026 posts 15836 karma points MVP 13x admin c-trib
    Aug 15, 2011 @ 16:02
    Lee Kelleher
    0

    Hi Pavel,

    There are 2 ways you can do this, both require editing a template/XSLT.

    1. In the template "umbBusinessHomepage.master" find the <umbraco:Macro Alias="umbBusinessFrontpageBlog"> tag and change "numberOfItems" to something ridiculously high - say 9999.

    2. In the XSLT file "umbBusinessFrontpageBlog.xslt" (the one which I think you are referring too). Find the line with "<xsl:if test="position() &lt;= $numberOfItems">" and remove it.  You'll need to also remove the closing </xsl:if> tag too.

    Good luck!

    Cheers, Lee.

  • Pavel Gutin 12 posts 32 karma points
    Aug 27, 2011 @ 17:27
    Pavel Gutin
    0

    I didn't forget about this post, just haven't had the time to reply. 

    I don't think I phrased my question very well. Take a look at the structure that gets generated http://i.imgur.com/qzvr2.png

    As you can see, the actual blog posting go into subfolders. I actually ended up doing the following, and it seems to work. 

    <xsl:for-each select="$currentPage/ancestor-or-self::* [@level=1]/umbBlog//umbBlogPost [@isDoc and string(umbracoNaviHide) != '1']">

    I would love to hear of a better of doing this


Please Sign in or register to post replies

Write your reply to:

Draft