我有自定义列表,需要使用 XSLT 在 webPartPage 中显示。我创建视图,其中只有一个字段Title
和 set scope="recursive"
,但在页面上仅显示文件夹标题。
<View BaseViewID="2" Type="HTML" TabularView="FALSE" Scope="Recursive">
<Toolbar Type="Standard" />
<ViewFields>
<FieldRef Name="Title"/>
</ViewFields>
<RowLimit Paged="TRUE">10</RowLimit>
</View>
我有链接它的功能
<File Path="MainPage/default.aspx" Url="default.aspx">
<View WebPartOrder="1" WebPartZoneID="Main" BaseViewID="2" List="$Resources:core,lists_Folder;/RequestList">
<![CDATA[
<webParts>
<webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
<metaData>
<type name="Microsoft.SharePoint.WebPartPages.XsltListViewWebPart, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
<importErrorMessage>Невозможно импортировать эту веб-часть.</importErrorMessage>
</metaData>
<data>
<properties>
<property name="InitialAsyncDataFetch" type="bool">False</property>
<property name="ChromeType" type="chrometype">Default</property>
<property name="Title" type="string" />
<property name="Height" type="string" />
<property name="CacheXslStorage" type="bool">True</property>
<property name="ListDisplayName" type="string" />
<property name="AllowZoneChange" type="bool">True</property>
<property name="AllowEdit" type="bool">True</property>
<property name="XmlDefinitionLink" type="string" />
<property name="DataFields" type="string" />
<property name="Hidden" type="bool">False</property>
<property name="ListName" type="string">{39C129CE-1800-48EB-A8ED-1C304C1FE457}</property>
<property name="NoDefaultStyle" type="string" null="true" />
<property name="AutoRefresh" type="bool">False</property>
<property name="ViewFlag" type="string">8388621</property>
<property name="Direction" type="direction">NotSet</property>
<property name="AutoRefreshInterval" type="int">60</property>
<property name="AllowConnect" type="bool">True</property>
<property name="Description" type="string" />
<property name="AllowClose" type="bool">True</property>
<property name="ShowWithSampleData" type="bool">False</property>
<property name="ParameterBindings" type="string">
<ParameterBinding Name="dvt_sortdir" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_sortfield" Location="Postback;Connection"/>
<ParameterBinding Name="dvt_startposition" Location="Postback" DefaultValue=""/>
<ParameterBinding Name="dvt_firstrow" Location="Postback;Connection"/>
<ParameterBinding Name="OpenMenuKeyAccessible" Location="Resource(wss,OpenMenuKeyAccessible)" />
<ParameterBinding Name="open_menu" Location="Resource(wss,open_menu)" />
<ParameterBinding Name="select_deselect_all" Location="Resource(wss,select_deselect_all)" />
<ParameterBinding Name="idPresEnabled" Location="Resource(wss,idPresEnabled)" />
<ParameterBinding Name="NoAnnouncements" Location="Resource(wss,noXinviewofY_LIST)" />
<ParameterBinding Name="NoAnnouncementsHowTo" Location="Resource(wss,noXinviewofY_DEFAULT)" />
</property>
<property name="Xsl" type="string" null="true" />
<property name="CacheXslTimeOut" type="int">86400</property>
<property name="WebId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">00000000-0000-0000-0000-000000000000</property>
<property name="ListUrl" type="string" />
<property name="DataSourceID" type="string" />
<property name="FireInitialRow" type="bool">True</property>
<property name="ManualRefresh" type="bool">False</property>
<property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">Html, TabularView, Hidden, Mobile</property>
<property name="ChromeState" type="chromestate">Normal</property>
<property name="AllowHide" type="bool">True</property>
<property name="PageSize" type="int">-1</property>
<property name="SampleData" type="string" null="true" />
<property name="BaseXsltHashKey" type="string" null="true" />
<property name="AsyncRefresh" type="bool">False</property>
<property name="HelpMode" type="helpmode">Modeless</property>
<property name="ListId" type="System.Guid, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">39c129ce-1800-48eb-a8ed-1c304c1fe457</property>
<property name="DataSourceMode" type="Microsoft.SharePoint.WebControls.SPDataSourceMode, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">List</property>
<property name="AllowMinimize" type="bool">True</property>
<property name="TitleUrl" type="string">default.aspx</property>
<property name="CatalogIconImageUrl" type="string">/_layouts/images/itgen.png</property>
<property name="DataSourcesString" type="string" />
<property name="GhostedXslLink" type="string">main.xsl</property>
<property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
<property name="DisplayName" type="string" />
<property name="UseSQLDataSourcePaging" type="bool">True</property>
<property name="Width" type="string" />
<property name="ExportMode" type="exportmode">All</property>
<property name="XslLink" type="string">/_layouts/[]/xsl/archive.xsl</property>
<property name="ViewContentTypeId" type="string">0x</property>
<property name="HelpUrl" type="string" />
<property name="XmlDefinition" type="string" />
<property name="Default" type="string" />
<property name="TitleIconImageUrl" type="string" />
<property name="MissingAssembly" type="string">Невозможно импортировать эту веб-часть.</property>
<property name="SelectParameters" type="string" />
</properties>
</data>
</webPart>
</webParts>
]]>
</View>
</File>
和简单的 xsl 像那里 http://msdn.microsoft.com/en-us/library/ff604024(v=office.14).aspx