简体   繁体   中英

Sharepoint page without masterpage

I need to create a Publishing Page without master page, I already try with a custom layout, and overriding PublishPageLayout but i'm getting unexpected error. The only master page I can assign is seattle.master, not even oslo.master, neither minimal.master or a custom masterpage, so it's like I can't do anything. (I already registered the assembly a safe in the web.config file) I can create a blank page from MSD but I don't know how to edit it, I mean, use some web parts and staff.

I'm sorry if you can't understand something I wrote, English is not my native language.

Hope someone can help me

Bye

A SharePoint masterpage always have to include the content placeholders that are available on the seattle or oslo master, if you create a master without them you will lose sharepoint functionalities or in the worst scenario you will get the blank page saying something went wrong.

What I suggest to you is keep all the contentholders and if you want to use them hide it using css.

Here is a sample of what you can do

<div style="display:none">
            <asp:ContentPlaceHolder ID="TitleZone" runat="server" Visible="false"></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="SliderZone" runat="server" Visible="false"></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="ActionTitleZone" runat="server" Visible="false"></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderHorizontalNav" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderPageImage" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderTitleLeftBorder" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderMiniConsole" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderTitleRightMargin" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderTitleAreaSeparator" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderNavSpacer" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderLeftNavBarBorder" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderBodyLeftBorder" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderBodyRightMargin" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderTitleAreaClass" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigation" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderGlobalNavigationSiteMap" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="WSSDesignConsole" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderTitleBreadcrumb" runat="server" Visible="false" ></asp:ContentPlaceHolder>
            <asp:ContentPlaceHolder id="PlaceHolderSiteName" runat="server" Visible="false" ></asp:ContentPlaceHolder>
</div>

One more solution to not to use master page is just create an aspx page from SharePoint designer which actually dont make use of any Master page neither custom nor Default.

The approach is...
1> Open your site in Sharepoint Designer .
2> From the Menu ribbon, select the Insert option.
3> Now you have to click on Page tab from same ribbon which will popup two options HTML and ASPX.
4> Better to select ASPX option that will create a new untitled page which you can rename and also modify it's contents the way you want.

Most importantly when you run same page in browser, you won't find any master page file content.

<style type="text/css">
.mainRibbon
{
display:none;
}

.navbar
{
display:none;
}
</style>

Just find and hide all controls of the master page for that particular page.

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM