Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 511
  • Last Modified:

Reorder a data view wep part (DVWP)


MOSS 2007

I only have access to the page via Edit Page and editing the DVWP in the gui.
I cannot update the view either.

How can I reverse sort this?

<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
	<xsl:import href="/Style Library/XSL Style Sheets/webTest.xsl"></xsl:import>
	<xsl:output method="html" indent="no"/>
	<xsl:decimal-format NaN=""/>
	<xsl:param name="dvt_apos">'</xsl:param>
	<xsl:param name="Today">CurrentDate</xsl:param>
	<xsl:variable name="dvt_1_automode">0</xsl:variable>
	
	<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
		<xsl:call-template name="dvt_1"/>
	</xsl:template>
	
	<xsl:template name="dvt_1">
		<xsl:variable name="dvt_StyleName">Table</xsl:variable>
		<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
		<xsl:variable name="dvt_RowCount" select="count($Rows)" />
		<xsl:variable name="IsEmpty" select="$dvt_RowCount = 0" />

		
		<xsl:call-template name="dvt_1.body">
			<xsl:with-param name="Rows" select="$Rows"/>
			</xsl:call-template>	
<br/>
		</xsl:template>

		
	<xsl:template name="dvt_1.body">
		<xsl:param name="Rows"/>
		<xsl:variable name="GroupStyle" select="'UpcomingHeader'"/>
		<xsl:call-template name="UpcomingHeader" />

<xsl:if test="count($Rows)=0">
<p>There are currently no upcoming webinars. For recordings of past webinars, please use the links below.</p>
</xsl:if>
		
		<xsl:for-each select="$Rows">
			<xsl:variable name="Style" select="'Upcoming'"/>
					<xsl:call-template name="Upcoming" /></xsl:for-each>
	</xsl:template>
		
	</xsl:stylesheet>

Open in new window

0
sullisnyc44
Asked:
sullisnyc44
  • 2
  • 2
1 Solution
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
Hello,

sorting takes place inside the xsl:for-each tag

		<xsl:for-each select="$Rows">
			<xsl:variable name="Style" select="'Upcoming'"/>
                        <xsl:sort select="@Title" order=”descending” />
			<xsl:call-template name="Upcoming" /></xsl:for-each>

Open in new window


Replace the "@Title" with the column you want to sort by.

cheers, teylyn
0
 
sullisnyc44Author Commented:
tells me to edit it in sharepoinnt designer. won't render.

forgot to mention that it's a publishing page
0
 
sullisnyc44Author Commented:
0
 
Ingeborg Hawighorst (Microsoft MVP / EE MVE)Microsoft MVP ExcelCommented:
You cannot change a DVWP in the browser. You need SharePoint Designer to edit the XSLT.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now