Changeset 26448 for main


Ignore:
Timestamp:
2012-11-06T15:29:17+13:00 (11 years ago)
Author:
kjdon
Message:

make the colleciton links add in any default params listed in the collection element

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/gslib.xsl

    r26202 r26448  
    203203  <xsl:template name="collectionLinkWithImage">
    204204    <xsl:variable name="desc"><xsl:value-of select="displayItem[@name='shortDescription']"/></xsl:variable>
     205    <xsl:variable name="coll_href"><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="@name"/>/page/about<xsl:choose><xsl:when test="libraryParamList/param">?<xsl:for-each select="libraryParamList/param"><xsl:value-of select="@name"/>=<xsl:value-of select="@default"/>&amp;</xsl:for-each></xsl:when></xsl:choose></xsl:variable>
    205206    <xsl:choose>
    206207      <xsl:when test="displayItem[@name='icon']">
    207         <a href="{$library_name}/collection/{@name}/page/about" title="{$desc}">
     208        <a href="{$coll_href}" title="{$desc}">
    208209          <img class="collectionLinkImage">
    209210            <xsl:attribute name="alt"><xsl:value-of select="displayItem[@name='name']"/></xsl:attribute>
     
    213214      </xsl:when>
    214215      <xsl:otherwise>
    215         <a href="{$library_name}/collection/{@name}/page/about" title="{$desc}">
     216        <a href="{$coll_href}" title="{$desc}">
    216217          <div class="collectionLink">
    217218            <xsl:value-of select="displayItem[@name='name']"/>
Note: See TracChangeset for help on using the changeset viewer.