If I have understood correctly I think you should be able to set a class on the post currently being shown like Petr is suggesting. In fact I think you can even use this snippet from the "navigation prototype" XSLT in Umbraco.
<xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id"> <!-- we're under the item - you can do your own styling here --> <xsl:attribute name="class"><xsl:text>active</xsl:text></xsl:attribute> </xsl:if>
This sets the a class named "active" to the currently viewed post.
Blog entry list selected highlighted
I am using Umbraco 4.0.3 and am trying to get the list of blog posts to show which one is currently being shown (e.g. by a colour change).
Is there an easy way of doing this?
Thanks in advance.
In xslt compare post id with $currentPage/@id and then set for example different class to link or whatever.
P.
Hi TaoistTrotty
If I have understood correctly I think you should be able to set a class on the post currently being shown like Petr is suggesting. In fact I think you can even use this snippet from the "navigation prototype" XSLT in Umbraco.
<xsl:if test="$currentPage/ancestor-or-self::node/@id = current()/@id">
<!-- we're under the item - you can do your own styling here -->
<xsl:attribute name="class"><xsl:text>active</xsl:text></xsl:attribute>
</xsl:if>
This sets the a class named "active" to the currently viewed post.
/Jan
Petr, this worked thanks.
It does not work on the first Blog page (probably due to this pulling in page(s) from the individual blog pages.
Is there a way around this?
Many thanks.
Michael
Jan, Thank you for your suggestion.
This also works.
Regards
TT
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.