![](/img/trans.png)
[英]Enabling publishing infrastructure feature by default in sharepoint 2010?
[英]Sharepoint 2010 - default page of custom site template with SharePoint Server Publishing feature
我為Sharepoint 2010創建了一個自定義網站模板。在此模板中,onet.xml中的以下代碼自動激活了SharePoint Server Publishing功能:
<WebFeatures>
<Feature ID="94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb" />
</WebFeatures>
我還通過這種方式在onet.xml中為默認頁面指定了模塊:
(在配置部分):
<Modules>
<Module Name="DefaultBlank" />
</Modules>
(並在“配置”部分指定):
<Module Name="DefaultBlank" Url="" Path="">
<File Url="default.aspx" Name="default.aspx" NavBarHome="True" Type="Ghostable">
</File>
</Module>
但是,當我基於此模板創建網站時,Sharepoint會自動重定向到NewSiteURL / Pages / default.aspx,這是我不想要的。 此默認頁面是通過發布功能自動創建的,它為空白。 但我希望將我准備的default.aspx作為默認頁面,因此地址應僅為NewSiteURL / default.aspx。 我嘗試通過發布功能的屬性進行設置:
<Feature ID="94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb">
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="WelcomePageUrl" Value="~/default.aspx"/>
</Properties>
</Feature>
但這不起作用。 有人知道如何解決這個問題嗎?
我已經有了答案,如果其他人有興趣,請點擊此鏈接:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.