Changeset 35277


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.

Location:
main/trunk
Files:
2 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>
  • main/trunk/model-sites-dev/opotiki/groupConfig.xml

    r34631 r35277  
    5959  <groupDescriptions>
    6060    <group name="culture">
    61       <title>Whakatōheatanga - Culture</title>
    62       <description>Kia pÅ«mau ki to tātou Whakatōheatanga.
    63       <br />Culturally empowered, fully conversant in Te Reo me ngā tikanga o Whakatōhea</description>
    64       <shortDescription>Pou Whakatōheatanga - Culture</shortDescription>
    65       <backgroundImage>images/pou-01-whakatoheatanga.jpg</backgroundImage>
     61      <displayItemList>
     62    <displayItem name="name">Whakatōheatanga - Culture</displayItem>
     63    <displayItem name="description">Kia pÅ«mau ki to tātou Whakatōheatanga.
     64    <br />Culturally empowered, fully conversant in Te Reo me ngā tikanga o Whakatōhea</displayItem>
     65    <displayItem name="shortDescription">Pou Whakatōheatanga - Culture</displayItem>
     66    <displayItem name="backgroundImage">images/pou-01-whakatoheatanga.jpg</displayItem>
     67      </displayItemList>
    6668    </group>
    6769    <group name="health">
    68       <title>Hauora - Health</title>
    69       <description>Whānau ora, hapÅ« ora, ka ora ai te Iwi<br />
    70       When our Whānau and hapÅ« are well our Iwi will thrive</description>
    71       <shortDescription>Pou Hauora - Health</shortDescription>
    72       <backgroundImage>images/pou-02-hauora.jpg</backgroundImage>
     70      <displayItemList>
     71    <displayItem name="name">Hauora - Health</displayItem>
     72    <displayItem name="description">Whānau ora, hapÅ« ora, ka ora ai te Iwi<br />
     73    When our Whānau and hapÅ« are well our Iwi will thrive</displayItem>
     74    <displayItem name="shortDescription">Pou Hauora - Health</displayItem>
     75    <displayItem name="backgroundImage">images/pou-02-hauora.jpg</displayItem>
     76      </displayItemList>
    7377    </group>
    7478    <group name="education">
    75       <title>Mātauranga - Education</title>
    76       <description>Ko te mātauranga te waka e kawe nei ngā wawata<br />
    77       Education is the vehicle to realizing our potential dreams and aspirations</description>
    78       <shortDescription>Pou Mātauranga - Education</shortDescription>
    79       <backgroundImage>images/pou-03-matauranga.jpg</backgroundImage>
     79      <displayItemList>
     80    <displayItem name="name">Mātauranga - Education</displayItem>
     81    <displayItem name="description">Ko te mātauranga te waka e kawe nei ngā wawata<br />
     82    Education is the vehicle to realizing our potential dreams and aspirations</displayItem>
     83    <displayItem name="shortDescription">Pou Mātauranga - Education</displayItem>
     84    <displayItem name="backgroundImage">images/pou-03-matauranga.jpg</displayItem>
     85      </displayItemList>
    8086    </group>
    8187    <group name="economics">
    82       <title>Whai Rawa - Economics</title>
    83       <description>Mā te whai rawa ka pūāwai te mana o Whakatōhea<br />
    84       Having an abundance of jobs and flourishing commercial activities,
    85       through collective strength.</description>
    86       <shortDescription>Pou Whai Rawa - Economic Development</shortDescription>
    87       <backgroundImage>images/pou-04-whai-rawa.jpg</backgroundImage>
     88      <displayItemList>
     89    <displayItem name="name">Whai Rawa - Economics</displayItem>
     90    <displayItem name="description">Mā te whai rawa ka pūāwai te mana o Whakatōhea<br />
     91    Having an abundance of jobs and flourishing commercial activities,
     92    through collective strength.</displayItem>
     93    <displayItem name="shortDescription">Pou Whai Rawa - Economic Development</displayItem>
     94    <displayItem name="backgroundImage">images/pou-04-whai-rawa.jpg</displayItem>
     95      </displayItemList>
    8896    </group>
    8997    <group name="social">
    90       <title>Manaakitanga - Social</title>
    91       <description>Manaaki i te tangata Mā te whānaunga, he tangata kotahi tātou<br />
    92       Empowered whānau to build strong relationships</description>
    93       <shortDescription>Pou Manaakitanga - Social, Wellbeing</shortDescription>
    94       <backgroundImage>images/pou-05-manaakitanga.jpg</backgroundImage>
     98      <displayItemList>
     99    <displayItem name="name">Manaakitanga - Social</displayItem>
     100    <displayItem name="description">Manaaki i te tangata Mā te whānaunga, he tangata kotahi tātou<br />
     101    Empowered whānau to build strong relationships</displayItem>
     102    <displayItem name="shortDescription">Pou Manaakitanga - Social, Wellbeing</displayItem>
     103    <displayItem name="backgroundImage">images/pou-05-manaakitanga.jpg</displayItem>
     104      </displayItemList>
    95105    </group>
    96106    <group name="environment">
    97       <title>Toi Ora - Environment</title>
    98       <description>Te tino rangatiratanga o a tātou whenua, o a tātou moana, awa me o tātou tāonga katoa.<br />
    99       We are active partners and kaitiaki (stewards) of our natural resources.</description>
    100       <shortDescription>Pou Toi Ora - Environment, Sustainability</shortDescription>
    101       <backgroundImage>images/pou-06-toi-ora.jpg</backgroundImage>
     107      <displayItemList>
     108    <displayItem name="name">Toi Ora - Environment</displayItem>
     109    <displayItem name="description">Te tino rangatiratanga o a tātou whenua, o a tātou moana, awa me o tātou tāonga katoa.<br />
     110    We are active partners and kaitiaki (stewards) of our natural resources.</displayItem>
     111    <displayItem name="shortDescription">Pou Toi Ora - Environment, Sustainability</displayItem>
     112    <displayItem name="backgroundImage">images/pou-06-toi-ora.jpg</displayItem>
     113      </displayItemList>
    102114    </group>
    103115  </groupDescriptions>
Note: See TracChangeset for help on using the changeset viewer.