A:不继承母板页,全空白
1,在SPD中右键需要添加页面的地方,选择“新建”--“ASPX”。
2,格式化当前页面。
3,在合适的地方点击“插入”--“SharePoint控件”---“web部件区域”。
4,右键当前aspx文件--“在浏览器中预览”,如下页面:
5,进入webpart编辑模式,即可添加quick Part等web part。
进入编辑模式:在webpart中输入:
?toolpaneview=2#
?PageView=Shared
?ToolPaneView=2&PageView=Shared
&ToolPaneView=2&PageView=Shared
B:继承母板页,只替换PlaceHolderMain的页面
1,在SPD中右键需要添加页面的地方,选择“新建”--“SharePoint内容”--“网页”--“Asp.Net”--“根据母板页创建”--选择适合的母板页。
2,复制以下内容添加进页面中。
3,保存并选择保存的位置。
精简页面
<%
@ Register TagPrefix
=
"
WebPartPages
"
Namespace
=
"
Microsoft.SharePoint.WebPartPages
"
Assembly
=
"
Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c
"
%>
< asp:Content ID ="Content2" runat ="server" ContentPlaceHolderID ="PlaceHolderMain" >
< WebPartPages:SPProxyWebPartManager runat ="server" ID ="ProxyWebPartManager" >
</ WebPartPages:SPProxyWebPartManager >
< style type ="text/css" >
TD.ms-titlearea, ms-pagetitle
{
display : none ;
}
.ms-pagetitleareaframe table
{
background : none ;
height : 10px ;
}
</ style >
</ asp:Content >
< asp:Content ID ="Content3" ContentPlaceHolderID ="PlaceHolderPageImage" runat ="server" >
< img src ="/_layouts/images/blank.gif" width ="1" height ="1" alt ="" ></ asp:Content >
< asp:Content ID ="Content2" runat ="server" ContentPlaceHolderID ="PlaceHolderMain" >
< WebPartPages:SPProxyWebPartManager runat ="server" ID ="ProxyWebPartManager" >
</ WebPartPages:SPProxyWebPartManager >
< style type ="text/css" >
TD.ms-titlearea, ms-pagetitle
{
display : none ;
}
.ms-pagetitleareaframe table
{
background : none ;
height : 10px ;
}
</ style >
</ asp:Content >
< asp:Content ID ="Content3" ContentPlaceHolderID ="PlaceHolderPageImage" runat ="server" >
< img src ="/_layouts/images/blank.gif" width ="1" height ="1" alt ="" ></ asp:Content >
以上JS部分用于缩短“Forecast”下方横条的高度。