Copied to clipboard

Flag this post as spam?

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


  • Alexandru 112 posts 272 karma points
    Oct 23, 2013 @ 10:19
    Alexandru
    0

    Blog posts

    Hello,

    I am trying to make a special kind of blog homepage and the following code takes care of rendering the classic blog homepage with posts one after another.

    I would like it to do the same thing, sort them in a descending order by the date but show posts from different authors. I don't want a second post from the same author to show. I would like to show the latest 5 posts from different authors only.

    Does it make sense?

    I can't figure out how to check other posts for the author name while looping through all the posts. Here's the regular blog works:

    <xsl:for-each select="$currentPage/ancestor-or-self::umbBlog//umbBlogPost">
        <xsl:sort select="./PostDate" order="descending" />
    
        <xsl:if test="position() &gt; $numberOfPosts * (number($pageNumber)-1) and
        position() &lt;= number($numberOfPosts * (number($pageNumber)-1) +
        $numberOfPosts )">
    
                <xsl:call-template name="showpost">
                    <xsl:with-param name="post" select="."/>
                </xsl:call-template>    
        </xsl:if>
    
       </xsl:for-each>
    
  • Alexandru 112 posts 272 karma points
    Oct 28, 2013 @ 09:41
    Alexandru
    0

    bump

Please Sign in or register to post replies

Write your reply to:

Draft