Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • syn-rg 282 posts 425 karma points
    Jun 18, 2012 @ 05:41
    syn-rg
    0

    List items based on dropdown list datatype options

    How can I list items based on the selected value of a dropdown list datatype?
    e.g.
    Dropdown list options:
    Option A
    Option B
    Option C

    List:
    Option A
    - PDF 1
    - PDF 4
    Option B
    - PDF 3
    - PDF 6
    Option C
    - PDF 2
    - PDF 5

    Any ideas on how I achieve this? Cheers, JV

     

  • syn-rg 282 posts 425 karma points
    Jun 18, 2012 @ 06:13
    syn-rg
    0

    The dataype property alias is "tariffCategory":

    <div class="pdf_download_container">
                <ul>
                  <xsl:for-each select="$files[(archive = 1)]">
                    <xsl:choose>
                      <xsl:when test="tariffCategory != ''">
                        <li>
                          <xsl:attribute name="class">
                            <xsl:value-of select="synrg:GetExtension(./umbracoFile)" />
                          </xsl:attribute>
                          <a href="{./umbracoFile}" title="{@nodeName}">
                            <xsl:value-of select="@nodeName" />
                          </a>
                          <xsl:if test="umbracoBytes != ''">
                            <span>
                              <xsl:choose>
                                <xsl:when test="assetDate != ''">
                                  <xsl:value-of select="umbraco.library:FormatDateTime(assetDate, 'dd MMMM yy')"/>
                                </xsl:when>
                                <xsl:otherwise>
                                  <xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'dd MMMM yy')"/>
                                </xsl:otherwise>
                              </xsl:choose>
                              <br/>(<xsl:value-of select="synrg:GetFileSize(((umbracoBytes div 1024) div 1024))" />)</span>
                          </xsl:if>
                          <xsl:if test="description != ''">
                            <p><xsl:value-of select="description"/><xsl:if test="readMoreLink != ''">&nbsp;<a href="{umbraco.library:NiceUrl(readMoreLink)}" title="{umbraco.library:GetXmlNodeById(readMoreLink)/@nodeName}">Read more</a></xsl:if></p>
                          </xsl:if>
                        </li>
                      </xsl:when>
                      <xsl:otherwise>
                        <li>
                          <xsl:attribute name="class">
                            <xsl:value-of select="synrg:GetExtension(./umbracoFile)" />
                          </xsl:attribute>
                          <a href="{./umbracoFile}" title="{@nodeName}">
                            <xsl:value-of select="@nodeName" />
                          </a>
                          <xsl:if test="umbracoBytes != ''">
                            <span>
                              <xsl:choose>
                                <xsl:when test="assetDate != ''">
                                  <xsl:value-of select="umbraco.library:FormatDateTime(assetDate, 'dd MMMM yy')"/>
                                </xsl:when>
                                <xsl:otherwise>
                                  <xsl:value-of select="umbraco.library:FormatDateTime(@updateDate, 'dd MMMM yy')"/>
                                </xsl:otherwise>
                              </xsl:choose>
                              <br/>(<xsl:value-of select="synrg:GetFileSize(((umbracoBytes div 1024) div 1024))" />)</span>
                          </xsl:if>
                          <xsl:if test="description != ''">
                            <p><xsl:value-of select="description"/><xsl:if test="readMoreLink != ''">&nbsp;<a href="{umbraco.library:NiceUrl(readMoreLink)}" title="{umbraco.library:GetXmlNodeById(readMoreLink)/@nodeName}">Read more</a></xsl:if></p>
                          </xsl:if>
                        </li>
                      </xsl:otherwise>
                    </xsl:choose>
                  </xsl:for-each>
                </ul>
                </div>
  • 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.

Please Sign in or register to post replies