Copied to clipboard

Flag this post as spam?

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


  • Natasha 79 posts 195 karma points
    Jan 29, 2014 @ 22:29
    Natasha
    0

    publish to a page according to dropdown selection

    Hi There

    I have a multiple drop down list and I would like to publish the selection as well as variations to a page.  My drop down has Early Childhood, Early Learning, Heath and disability.  So far I have made it publish if a person selects Early Childhood only, but I would like it to publish if a person selects Early childood and something else. I tried using the comtains property but it returned nothing.  Any help or a pointer in the right direction would help.  My code is below:

    Thanks

    Natasha

     

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp "&#x00A0;"> ]>
    <xsl:stylesheet
      version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:msxml="urn:schemas-microsoft-com:xslt"
      xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" xmlns:umbraco.contour="urn:umbraco.contour" xmlns:App_Code.XsltExtensions="urn:App_Code.XsltExtensions"
      exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets umbraco.contour App_Code.XsltExtensions ">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:variable name="documents" select="umbraco.library:GetMedia(12241, 1)"/>
        <xsl:template match="/">
      <xsl:if test="count($documents) > 0">
        
        
              <ul>            
        <xsl:for-each select="$documents//*">
          <xsl:if test="./umbracoFile != ''">
            <xsl:if test="contains(./theme, '377')">
           <li><a href="{./umbracoFile}" target="_blank"><xsl:value-of select="./resourceTitle" /></a>,
                     <xsl:if test="./resourceType = 'PDF'">
               <img src="/media/913344/pdf.png" />
             </xsl:if>
             <xsl:if test="./resourceType = 'Word'">
               <img src="/media/913352/word.png" />
             </xsl:if>
             <xsl:if test="./resourceType = 'Excel'">
               <img src="/media/913360/excel.png" />
             </xsl:if>
             <xsl:if test="./resourceType = 'PowerPoint'">
               <img src="/media/913368/pp.png" />
             </xsl:if>
             [<xsl:value-of select="./fileSize" />]
             <p><xsl:value-of select="./description" /></p>
                          </li>
          </xsl:if>
                </xsl:if>
                  </xsl:for-each>         
              </ul>
            </xsl:if>
        </xsl:template>
    </xsl:stylesheet>

     

     

  • Lasya 38 posts 70 karma points
    Jan 30, 2014 @ 10:57
    Lasya
    0

    Hi natasha

    Lets try with this  <xsl:iftest="contains(./theme, umbraco.library:GetPreValueAsString(377))"> instead of  <xsl:iftest="contains(./theme, '377')">

    I think it should work because i have used this in lot of programs.

    Thanks,

    Lasya

  • Natasha 79 posts 195 karma points
    Jan 30, 2014 @ 11:21
    Natasha
    0

    Lasya I could kiss you - you're a super star.  Thanks so much it worked.

    All the best

    Natasha

Please Sign in or register to post replies

Write your reply to:

Draft