2013-05-07 71 views
3

我需要創建一個沒有母版頁的發佈頁面,我已經嘗試使用自定義佈局,並覆蓋PublishPageLayout但我收到了意想不到的錯誤。我可以分配的唯一主頁是seattle.master,甚至不是oslo.master,既不是minimal.master,也不是自定義masterpage,所以就像我什麼都做不了。 (我已經在web.config文件中註冊了一個安全組件) 我可以從MSD創建一個空白頁面,但我不知道如何編輯它,我的意思是使用一些Web部件和工作人員。沒有母版頁的Sharepoint頁面

如果你不明白我寫的東西,我很抱歉,英文不是我的母語。

希望有人能幫助我

再見

回答

7

一個SharePoint母版總是要包括可在西雅圖或奧斯陸的主人,如果你沒有他們創建主,你將失去的SharePoint功能的內容佔位符或者在最糟糕的情況下,你會看到空白頁面,說出了問題。

我向你推薦的是保留所有的內容,如果你想使用它們,用css隱藏它。

這裏是你可以做

<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> 
+0

非常感謝你,正是我所需要的。我不能給你分,我沒有足夠的聲譽 – 2013-06-10 12:47:19

+0

佩德羅,我很高興知道這解決了你的問題 – 2013-06-13 13:41:42

1

什麼人更多的解決方案不使用母版頁剛剛創建SharePoint設計一個aspx頁面,實際上不使用任何母版頁既不定製的樣品,也不默認。

該方法是...
1>打開您的網站Sharepoint設計師
2>從菜單功能區中,選擇插入選項。
3>現在您必須點擊同一功能區中的頁面選項卡,該選項卡將彈出兩個選項HTML和ASPX。
4>更好地選擇ASPX選項將創建一個新的無標題頁面,您可以重新命名並根據需要修改其內容。

最重要的是,當您在瀏覽器中運行相同的頁面時,您將找不到任何母版頁文件內容。

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

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

只需找到並隱藏該特定頁面的母版頁的所有控件。