Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/xslt/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sorting SharePoint 2013博客:按作者对帖子排序_Sorting_Xslt_Sharepoint_Filter_Blogs - Fatal编程技术网

Sorting SharePoint 2013博客:按作者对帖子排序

Sorting SharePoint 2013博客:按作者对帖子排序,sorting,xslt,sharepoint,filter,blogs,Sorting,Xslt,Sharepoint,Filter,Blogs,我正在尝试创建一个自定义过滤器,对SharePoint 2013博客中的作者和用户进行排序。我正在使用XSL数据视图,并将其导出到web部件。我有一个名为Author的专栏,它从创建者那里获取信息。当我在web部件中单击某个用户时,它会显示所有帖子,而不是所选作者。URL为mysite/default.aspx?Author=FirstName-LastName 代码default.aspx: <xsl:template match="/" xmlns:x="http://www.w3.

我正在尝试创建一个自定义过滤器,对SharePoint 2013博客中的作者和用户进行排序。我正在使用XSL数据视图,并将其导出到web部件。我有一个名为Author的专栏,它从创建者那里获取信息。当我在web部件中单击某个用户时,它会显示所有帖子,而不是所选作者。URL为mysite/default.aspx?Author=FirstName-LastName

代码default.aspx:

 <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">RepForm3</xsl:variable>
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[not(@Author.title=preceding-sibling::Row/@Author.title)]" />

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

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

    <xsl:template name="dvt_1.header">
        <xsl:param name="Rows" />
        <div class="blogRefineByAuthorEveryAuthor"><a href="default.aspx">Everyone</a></div>
    </xsl:template>

    <xsl:template name="dvt_1.body">
        <xsl:param name="Rows"/>
        <xsl:for-each select="$Rows">
            <xsl:call-template name="dvt_1.rowview" />
        </xsl:for-each>
    </xsl:template>

    <xsl:template name="dvt_1.rowview">
        <div class="blogRefineByAuthorAuthorTitle">
            <a href="default.aspx?Author={@Author.title}"><xsl:value-of select="@Author.title" /></a>
        </div>
    </xsl:template>
有什么想法吗?在名字和姓氏之间的URL中有一个空格,但我认为这没有任何意义。我已尝试使用%20,但没有任何结果。

可能重复使用%20