Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
Examples in Content query web part of MS Sharepoint server
1938 Views
Example
<!-- content query web part xsl 751885 -->
<xsl:template name="strip-tags">
<xsl:param name="text"/>
<xsl:choose>
    <xsl:when test="contains($text, '&lt;')">
       <xsl:value-of select="substring-before($text, '&lt;')"/>
       <xsl:call-template name="strip-tags">
          <xsl:with-param name="text" select="substring-after($text, '&gt;')"/>
       </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
       <xsl:value-of select="$text"/>
    </xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template name="blog" match="Row[@Style='blog']" mode="itemstyle">
  <xsl:variable name="url" >
     <xsl:value-of select="@Image" disable-output-escaping="yes"/>
  </xsl:variable>
  <xsl:variable name="imglink" select="substring-before($url,',')" > </xsl:variable>
  <xsl:variable name="author" >
     <xsl:value-of select="@PostCategory" disable-output-escaping="yes"/>
  </xsl:variable>
  <xsl:variable name="authorlink" select="substring($author,4)" > </xsl:variable>
   <xsl:variable name="description" >
     <xsl:value-of select="@Body" disable-output-escaping="yes"/>
  </xsl:variable>
     <xsl:variable name="deslink" ><xsl:call-template name="strip-tags"><xsl:with-param name="text" select="$description"/></xsl:call-template></xsl:variable> 
    <xsl:variable name="desfinal" select="substring($deslink,1,280)"> </xsl:variable> 
<div class="container">
      <div class="title"><xsl:value-of select="@Title" disable-output-escaping="yes"/></div><br/><br/>
      <div class="datePosted"><xsl:value-of select="@PublishedDate" disable-output-escaping="yes"/>,BY <span style="color:rgb(115,62,82);"><xsl:value-of select="@Author" disable-output-escaping="yes"/></span></div><br/><br/><br/>
    <div class="content">
      <div class="image"><img src="{$imglink}" width="296px;" height="200px;"></img></div>
      <div class="bodyDescription">
         <div class="description"><xsl:value-of select="$desfinal" disable-output-escaping="yes"/>.....</div>
         <div class="readButton"></div>
      </div>
    </div>
     <div class="taggedBy">Tagged Under:<span style="color:rgb(115,62,82);"><xsl:value-of select="$authorlink" disable-output-escaping="yes"/></span></div>
  </div>
</xsl:template>
<!-- content query web part xsl 751885 -->
<!-- RightColumn CQWP xsl 730009 -->
<xsl:template name="LatestUpdates" match="Row[@Style='LatestUpdates']" mode="itemstyle">
        <xsl:variable name="DisplayTitle">
            <xsl:call-template name="OuterTemplate.GetTitle">
                <xsl:with-param name="Title" select="@Title"/>
                <xsl:with-param name="UrlColumnName" select="'LinkUrl'"/>
            </xsl:call-template>
        </xsl:variable>
        <xsl:variable name="Count">
      <xsl:number level="single" count="Row"/>
    </xsl:variable>
        <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row" />
        <xsl:variable name="RowCount" select="count($Rows)" />
        <xsl:variable name="CurPosition" select="$Count" />
            <div id="OuterDiv">
         <xsl:if test="$CurPosition = '1'">
          <div id="TitleDiv">Latest Updates</div>         
         </xsl:if>
         <div id="InnerDiv">
          <ul class="UpdatesList"><li><a href=""><xsl:value-of select="$DisplayTitle"></xsl:value-of></a></li></ul>
         </div>
         </div>
</xsl:template>
Next Topics
Next lessons of current book.
Content query web part of MS Sharepoint server
Content query web part of MS Sharepoint server
Content query web part of MS Sharepoint server
Content query web part of MS Sharepoint server
Picture gallery web part of MS Sharepoint server
Previous Topics
Previous lessons of current book.
Best Lessons of "MS Sharepoint server"
Top lessons which are viewed more times.
Best solution url of MS Sharepoint server
Content query web part of MS Sharepoint server
Content query web part of MS Sharepoint server
Picture gallery web part of MS Sharepoint server
Content query web part of MS Sharepoint server
Best solution url of MS Sharepoint server
Content query web part of MS Sharepoint server
Content query web part of MS Sharepoint server
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details