Knowledge Walls
Gopal Rao
Mumbai, Maharashtra, India
Passcode:
Examples in Content query web part of MS Sharepoint server
771 Views
XSLT
	<!-- 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_blog"><a href="PostDetail.aspx?ItemId={@ID}"><xsl:value-of select="@Title" disable-output-escaping="yes"/></a></div>
	     <div class="datePost"><span class="date"><xsl:value-of select="ddwrt:FormatDateTime(string(@PublishedDate),1033,'dd MMM yyyy')" disable-output-escaping="yes"/></span>, BY <span class="author_blog"><xsl:value-of select="@Author" disable-output-escaping="yes"/></span></div>
	     <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"><a href="PostDetail.aspx?ItemId={@ID}">Read More</a></div>
	     </div>
	   </div>
	    <div class="taggedBy">Tagged Under:<span class="category"><xsl:value-of select="$authorlink" disable-output-escaping="yes"/></span></div>
	 </div>
	</xsl:template>
	<!-- content query web part xsl 751885 -->
	<!-- RightColumn CQWP xsl Latest Updates begins-->
	<xsl:template name="LatestUpdates" match="Row[@Style='LatestUpdates']" mode="itemstyle">
	    <xsl:param name="CurPos"/>
	 <xsl:param name="LastRow"/>
	        <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:if test="$CurPos= '1'">
	       <xsl:text disable-output-escaping="yes">&lt;div class="dvLeftSideWebpart"&gt;</xsl:text>
	       <div class="dvgreyRoundCornersLeftTop"></div>
	       <div class="dvgreyRoundCornersRightTop"></div>
	       <div id="title_LP">Latest Updates</div>         
	        </xsl:if>
	  <div id="Outer">
	        <div id="Inner_part">
	<a href="PostDetail.aspx?ItemID={@ID}">
	<xsl:value-of select="$DisplayTitle"></xsl:value-of>
	</a>
	        </div>
	        </div>
	        <xsl:if test="$CurPos= $LastRow">
	        <xsl:text disable-output-escaping="yes">&lt;/div&gt;</xsl:text>
	        </xsl:if>
	</xsl:template>
	<!-- RightColumn CQWP xsl LatestUpdates ends-->
Template Call
	<xsl:when test="@Style='iCenterUpdates'">
	               <xsl:apply-templates select="." mode="itemstyle">
	                  <xsl:with-param name="CurPos" select="$CurPosition" />
	                   <xsl:with-param name="LastRow" select="$LastRow" />
	               </xsl:apply-templates>
	</xsl:when>
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
Best solution url of MS Sharepoint server
Previous Topics
Previous lessons of current book.
Picture gallery web part of MS Sharepoint server
Best Lessons of "MS Sharepoint server"
Top lessons which are viewed more times.
Content query web part of MS Sharepoint server
Best solution url 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
Content query web part of MS Sharepoint server
Content query web part of MS Sharepoint server
Best solution url 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