I have been asked to modify a home page to a completely new design, all other pages will remain exactly the same.
I am a little green when it comes to sharepoint. I have created the masterpage, however when i choose set as default master page or set as customer masterpage it changes for the entire site. I would only like to change the home page.
The only option I have come across at this point would seem to be Detach from page layout which would not be ideal as the remainder of the site may be pushed into this new skin
Programmatically changing the masterpage for this particular page is the only option as nigel says.
You can create a custom page layout for the homepage and then set the masterpage on the pre-init as shown below:
public class MyPageLayout:PublishingLayoutPage
{
protected override void OnPreInit(EventArgs e)
{
base.OnPreInit(e);
this.MasterPageFile = "~/_catalogs/masterpage/mynewmasterpage.master";
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With