Ignore:
Timestamp:
2021-08-10T17:12:05+12:00 (3 years ago)
Author:
anupama
Message:

Followed Kathy's advice and reorganised groupConfig.xml (and its processing in transform/pages/home) to use displayItemList>displayItem elementsstructure instead of individual title, shortDescription, backgroundImage etc elements.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/wmtb/transform/pages/home.xsl

    r35256 r35277  
    207207    <xsl:template match="group" name="customGroupDescription">
    208208
    209       <xsl:variable name="short"><xsl:value-of select="shortDescription"/></xsl:variable>
    210       <xsl:variable name="desc"><xsl:value-of select="description"/></xsl:variable>
     209      <xsl:variable name="title"><xsl:value-of select="displayItemList/displayItem[@name='name']"/></xsl:variable>
     210      <xsl:variable name="short"><xsl:value-of select="displayItemList/displayItem[@name='shortDescription']"/></xsl:variable>
     211      <xsl:variable name="desc"><xsl:value-of select="displayItemList/displayItem[@name='description']"/></xsl:variable>
     212      <xsl:variable name="bgImg"><xsl:value-of select="displayItemList/displayItem[@name='backgroundImage']"/></xsl:variable>
    211213      <xsl:variable name="group_href"><xsl:value-of select="$library_name"/>/group/<xsl:if test="/page/pageRequest/paramList/param[@name='group']"><xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/>/</xsl:if><xsl:value-of select="@name"/></xsl:variable>
    212      
     214
    213215      <div class="img-and-desc">
    214216      <!-- if there is an image for this group, this is displayed -->     
    215       <xsl:if test="util:checkFileExistence($site_name, backgroundImage)">
     217      <xsl:if test="util:checkFileExistence($site_name, $bgImg)">
    216218        <div class="wsite-image wsite-image-border-thin " style="padding-top:10px;padding-bottom:10px;margin-left:0;margin-right:0;text-align:center">
    217219          <!-- the group (pou) image links to the collection's about page -->
     
    219221        <div style="background-color:#404040;margin-left:11px; margin-right: 11px;">
    220222          <img class="groupLinkImage">
    221             <xsl:attribute name="alt"><xsl:value-of select="@name"/></xsl:attribute>
    222             <xsl:attribute name="title"><xsl:value-of select="@name"/></xsl:attribute>
     223            <xsl:attribute name="alt"><xsl:value-of select="$title"/></xsl:attribute>
     224            <xsl:attribute name="title"><xsl:value-of select="$title"/></xsl:attribute>
    223225            <xsl:attribute name="style"><xsl:text>max-width:100%;opacity:0.4;padding: 0 !important;</xsl:text></xsl:attribute>
    224             <xsl:attribute name="src">sites/<xsl:value-of select="$site_name"/>/<xsl:value-of select="backgroundImage"/></xsl:attribute>
     226            <xsl:attribute name="src">sites/<xsl:value-of select="$site_name"/>/<xsl:value-of select="$bgImg"/></xsl:attribute>
    225227          </img>
    226228        </div>
Note: See TracChangeset for help on using the changeset viewer.