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
Currently I am using this XSLT to display my blogs number of comments, pageviews, and tags. How can I convert this to work in the Blogpost?
<xsl:variable name="numberofcomments" select="count(BlogLibrary:GetCommentsForPost($post/@id)//comment)"/> <xsl:choose> <xsl:when test="$numberofcomments = 1"> <a href="{umbraco.library:NiceUrl(@id)}#comments">1 comment</a> </xsl:when> <xsl:otherwise> <a href="{umbraco.library:NiceUrl(@id)}#comments"> <xsl:value-of select="$numberofcomments"/> comments </a> </xsl:otherwise> </xsl:choose> & <xsl:choose> <xsl:when test="$post/pageViewCount= 1">1 pageview </xsl:when> <xsl:otherwise> <xsl:value-of select="$post/pageViewCount"/> pageviews </xsl:otherwise> </xsl:choose>}</small> </span> <span class="tags"><xsl:variable name="tags" select="tagsLib:getTagsFromNode(@id)" /> <xsl:choose> <xsl:when test="count($tags/tags/tag) = 0"> Not tagged </xsl:when> <xsl:otherwise> TAGS: <xsl:for-each select="$tags/tags/tag"> <a href="{umbraco.library:NiceUrl($currentPage/ancestor-or-self::* [@isDoc]/Blog [@isDoc]/@id)}?filterby={.}" rel="tag"> <xsl:value-of select="."/> </a> <xsl:if test="position() != last()">, </xsl:if> </xsl:for-each> </xsl:otherwise> </xsl:choose> </span>
Thanks.
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Editing blogroll variable to work in BlogPost.
Currently I am using this XSLT to display my blogs number of comments, pageviews, and tags. How can I convert this to work in the Blogpost?
<xsl:variable name="numberofcomments" select="count(BlogLibrary:GetCommentsForPost($post/@id)//comment)"/>
<xsl:choose>
<xsl:when test="$numberofcomments = 1">
<a href="{umbraco.library:NiceUrl(@id)}#comments">1 comment</a>
</xsl:when>
<xsl:otherwise>
<a href="{umbraco.library:NiceUrl(@id)}#comments">
<xsl:value-of select="$numberofcomments"/> comments
</a>
</xsl:otherwise>
</xsl:choose> & <xsl:choose>
<xsl:when test="$post/pageViewCount= 1">1 pageview
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$post/pageViewCount"/> pageviews
</xsl:otherwise>
</xsl:choose>}</small>
</span>
<span class="tags"><xsl:variable name="tags" select="tagsLib:getTagsFromNode(@id)" />
<xsl:choose>
<xsl:when test="count($tags/tags/tag) = 0">
Not tagged
</xsl:when>
<xsl:otherwise>
TAGS:
<xsl:for-each select="$tags/tags/tag">
<a href="{umbraco.library:NiceUrl($currentPage/ancestor-or-self::* [@isDoc]/Blog [@isDoc]/@id)}?filterby={.}" rel="tag">
<xsl:value-of select="."/>
</a>
<xsl:if test="position() != last()">, </xsl:if>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>
</span>
Thanks.
is working on a reply...