Copied to clipboard

Flag this post as spam?

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


  • Max 144 posts 166 karma points
    May 16, 2011 @ 09:16
    Max
    0

    checkbox list sorting multiple data using xslt

    I have an employee document type with a data type fro office departments

    using checkbox list now One employee can be in multiple departments so when i save the employee in more than 1 depatment it saves the data but in xslt i cannot sort it 

    here is my xslt i need to allow employees from multiple departments to be allowed to sort by parring the department name as parameter :

    <xsl:variable name="DeptName" select="umbraco.library:RequestQueryString('DeptName')"/>

    <div id="EmployeeMain" class="empMain">
      <xsl:for-each select="$currentPage/*[@isDoc and string(umbracoNaviHide) = '1'] ">
        <xsl:choose>  
          <xsl:when test="$DeptName != ''">  
            <xsl:if test="employeeDepartment=$DeptName">     
               <div id="empleft" class="empListMain">
              
                  <div id="LeftImage" class="empImage">
                     <xsl:element name="img">
                     <xsl:attribute name="src"><xsl:value-of select="employeePicture"/></xsl:attribute>
                    </xsl:element>
                  </div>
         
                  <div id="leftItems" class="empListText">
                    <strong> <xsl:value-of select="employeeName"/></strong><br/> 
                    <strong>  <xsl:value-of select="employeeDesignation"/></strong><br/>
                      Tel: <xsl:value-of select="employeePhone"/>  <br/>
                     Mobile:<xsl:value-of select="employeeMobile"/> <br/>
                     Email:<a href='mailto:{employeeEmail}'><xsl:value-of select="employeeEmail"/> </a> 
                  </div>
                <br/>
                <!-- here it goes another two "new" divs -->
              </div>
            </xsl:if> 
            <xsl:if test="$DeptName='-Department-'">     
               <div id="empleft" class="empListMain">
              
                  <div id="LeftImage" class="empImage">
                     <xsl:element name="img">
                     <xsl:attribute name="src"><xsl:value-of select="employeePicture"/></xsl:attribute>
                    </xsl:element>
                  </div>
         
                  <div id="leftItems" class="empListText">
                    <strong> <xsl:value-of select="employeeName"/></strong><br/> 
                    <strong>  <xsl:value-of select="employeeDesignation"/></strong><br/>
                      Tel: <xsl:value-of select="employeePhone"/>  <br/>
                     Mobile:<xsl:value-of select="employeeMobile"/> <br/>
                     Email:<a href='mailto:{employeeEmail}'><xsl:value-of select="employeeEmail"/> </a> 
                  </div>
                <br/>
                <!-- here it goes another two "new" divs -->
              </div>
            </xsl:if> 
         </xsl:when> 
       <xsl:otherwise>   
         <div id="empleft" class="empListMain">
           <div id="LeftImage" class="empImage">
                <xsl:element name="img">
                 <xsl:attribute name="src"><xsl:value-of select="employeePicture"/></xsl:attribute>
                </xsl:element>
            </div>
            
           <div id="leftItems" class="empListText">
                <strong> <xsl:value-of select="employeeName"/></strong><br/> 
                  <strong>  <xsl:value-of select="employeeDesignation"/></strong><br/>
                    Tel: <xsl:value-of select="employeePhone"/>  <br/>
                   Mobile:<xsl:value-of select="employeeMobile"/> <br/>
                   Email:<a href='mailto:{employeeEmail}'><xsl:value-of select="employeeEmail"/> </a> 
            </div>
            <br/>
            <!-- here it goes another two "new" divs -->
          </div>
         </xsl:otherwise>
      </xsl:choose>
      </xsl:for-each>


     </div>

    any code examples or suggestions wil be very useful

     

Please Sign in or register to post replies

Write your reply to:

Draft