Distinctive “current” navigation links
One of the (sadly few) nice things that DSpace’s JSP interface did was call out the link for the page you happened to be on in the navigation sidebar. The magic was a class attribute on the current page’s link, plus a bit of CSS.
Manakin doesn’t do that out of the box. But it can, and I just spent entirely too much time making it do so. Y’all get the benefit of my cussing streak.
The first trick is to figure out just what the address of the current page is. Go up to the top level of your theme’s XSLT stylesheet and add this:
<xsl:variable name="currentpage"> <xsl:value-of select="$context-path"/> <xsl:text>/</xsl:text> <xsl:value-of select="/dri:document/dri:meta/dri:pageMeta/dri:metadata[@element='request' and @qualifier='URI']“/> </xsl:variable>
(Incidentally, could somebody with more XSLT-fu than I have kindly explain what the difference is between dri:metadata[@element='request' and @qualifier='URI'] and dri:metadata[@element='request'][@qualifier='URI']? I know there is one, because it keeps tripping me up.)
Now you need your <dri:xref> transformation to take notice. Here’s how it works:
<xsl:template match="dri:xref">
<a>
<xsl:attribute name="href"><xsl:value-of select="@target"/></xsl:attribute>
<xsl:if test="($currentpage)=(@target)">
<xsl:attribute name="class">
<xsl:text>current</xsl:text>
</xsl:attribute>
</xsl:if>
<xsl:apply-templates />
</a>
</xsl:template>
And then you may style at will.
This only works for side navbar links. It doesn’t currently work for the alphabet links at the top of browse-by pages, because they’ve got parameters attached. (If I recall correctly, there may be some URL-space rearrangements in current Manakin versions that might fix this.) Happy designing!