I created a custom site template for Sharepoint 2010. In this template is automatically activated SharePoint Server Publishing feature by this code in onet.xml:
<WebFeatures>
<Feature ID="94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb" />
</WebFeatures>
I have also specified module for default page in onet.xml in this way:
(in configuration section):
<Modules>
<Module Name="DefaultBlank" />
</Modules>
(and specified under configuration section):
<Module Name="DefaultBlank" Url="" Path="">
<File Url="default.aspx" Name="default.aspx" NavBarHome="True" Type="Ghostable">
</File>
</Module>
But when I create site based on this template Sharepoint automatically redirect to NewSiteURL/Pages/default.aspx, which is something what I do not want. This default page is created automatically by publishing feature and it is blank. But I want as default page my prepared default.aspx, so address should be just NewSiteURL/default.aspx. I tried set this up by property of Publishing feature:
<Feature ID="94c94ca6-b32f-4da9-a9e3-1f3d343d7ecb">
<Properties xmlns="http://schemas.microsoft.com/sharepoint/">
<Property Key="WelcomePageUrl" Value="~/default.aspx"/>
</Properties>
</Feature>
But it's not working. Does anybody know how to resolve this problem?
I have already an answer, if somebody else is interested in follow this link:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.