2014-06-13

I'm trying to deploy a web template to Sharepoint 2013 as a sandboxed solution with Visual Studio. I was hoping that I could "replace" the default.aspx with my own page. The deployment consists of two features.

First Feature:
The web template with onet.xml and Elements.xml

Second Feature:
A module containing a custom .aspx file (my page)

What I'm trying to achieve is:

After creating a new site collection with the web template as a template my custom .aspx file should be displayed on the Home link. Normally the default.aspx page ist loaded. I thought I could display my custom page by default but it doesn't work. (Server Error in '/' Application.)

My onet.xml looks like this:

The feature ID references the second feature.

This is the elements.xml from my custom page:

This is the elements.xml from the web template:

Maybe its just my understanding that needs to be straightend. I thought this would be a nice solution to replace the default.aspx with my own, rather than renaming it through a feature receiver.

EDIT:

Following Derek's suggestion I changed my elements.xml of the module provided by adding the suggested propertybag:

But it seems to have no impact on the home page of the created site. I also changed the onet.xml by removing the Default-Module. For now it looks like this:

If I call http://myserver.com/sites/testsite SharePoint tries to load the default.aspx which is no longer provided. The screen I get looks like this:



However if I'm calling http://myserver.com/sites/testsite/SitePages/defaultya.aspx I can see my custom page.

One more note:
I'm deploying both features at site level.

Show more