欢迎来到Doc100.Net免费学习资源知识分享平台!
您的位置:首页 > 程序异常 >

求帮助,怎么在web part 页中插入左侧导航

更新时间: 2014-01-05 03:04:48 责任编辑: Author_N1

 

求帮助,如何在web part 页中插入左侧导航?
在创建一个新的页面的时候,可以创建Wiki的页面,直接就有左侧导航,可是如果一个Web part 页就是空白的,怎么添加呢。

还有个问题就是如果自己在designer里点击“Advanced Mode” 去编辑代码, 该网页就有Important StatusThe current page has been customized from its template的提示, 如何去掉呢?


谢谢大侠们!
--参考方法--
1. 可以在WebPart页面中添加Sharepoint:SPNavigationManager:
	<Sharepoint:SPNavigationManager
id="QuickLaunchNavigationManager"
runat="server"
QuickLaunchControlId="QuickLaunchMenu"
ContainedControl="QuickLaunch"
EnableViewState="false"
CssClass="ms-quicklaunch-navmgr">
<div>
<SharePoint:DelegateControl runat="server" ControlId="QuickLaunchDataSource">
<Template_Controls>
<asp:SiteMapDataSource SiteMapProvider="SPNavigationProvider" ShowStartingNode="False" id="QuickLaunchSiteMap" StartingNodeUrl="sid:1025" runat="server" />
 </Template_Controls>
</SharePoint:DelegateControl>
<SharePoint:UIVersionedContent UIVersion="3" runat="server">
<ContentTemplate>
<SharePoint:AspMenu id="QuickLaunchMenu" runat="server" DataSourceId="QuickLaunchSiteMap" Orientation="Vertical" StaticDisplayLevels="2" ItemWrap="true" MaximumDynamicDisplayLevels="0" StaticSubMenuIndent="0" SkipLinkText="" CssClass="s4-die">
<LevelMenuItemStyles>
<asp:menuitemstyle CssClass="ms-navheader" />
<asp:menuitemstyle CssClass="ms-navitem" />
</LevelMenuItemStyles>
<LevelSubMenuStyles>
<asp:submenustyle CssClass="ms-navSubMenu1" />
<asp:submenustyle CssClass="ms-navSubMenu2" />
</LevelSubMenuStyles>
<LevelSelectedStyles>
<asp:menuitemstyle CssClass="ms-selectednavheader" />
<asp:menuitemstyle CssClass="ms-selectednav" />
</LevelSelectedStyles>
</SharePoint:AspMenu>
</ContentTemplate>
</SharePoint:UIVersionedContent>
<SharePoint:UIVersionedContent UIVersion="4" runat="server">
<ContentTemplate>
<SharePoint:AspMenu id="V4QuickLaunchMenu" runat="server" EnableViewState="false" DataSourceId="QuickLaunchSiteMap" UseSimpleRendering="true" UseSeparateCss="false" Orientation="Vertical" StaticDisplayLevels="2" MaximumDynamicDisplayLevels="0" SkipLinkText="" CssClass="s4-ql" />
</ContentTemplate>
</SharePoint:UIVersionedContent>
</div>
</Sharepoint:SPNavigationManager>
<Sharepoint:UIVersionedContent runat="server" UIVersion="3">
<ContentTemplate>
<Sharepoint:SPNavigationManager
id="TreeViewNavigationManager"
runat="server"
ContainedControl="TreeView"
>
  <table class="ms-navSubMenu1" cellpadding="0" cellspacing="0" border="0">
<tr>
  <td>
<table class="ms-navheader" width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr>
<td nowrap="nowrap" id="idSiteHierarchy">
  <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" id="idNavLinkSiteHierarchy" Text="<%$Resources:wss,treeview_header%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"/>
</td>
  </tr>
</table>
  </td>
</tr>
  </table>
  <div class="ms-treeviewouter">
<SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">
  <Template_Controls>
<SharePoint:SPHierarchyDataSourceControl
 runat="server"
 id="TreeViewDataSource"
 RootContextObject="Web"
 IncludeDiscussionFolders="true"
/>
<SharePoint:SPRememberScroll runat="server" id="TreeViewRememberScroll" onscroll="javascript:_spRecordScrollPositions(this);" style="overflow: auto;height: 400px;width: 150px; ">
  <Sharepoint:SPTreeView
id="WebTreeView"
runat="server"
ShowLines="false"
DataSourceId="TreeViewDataSource"
ExpandDepth="0"
SelectedNodeStyle-CssClass="ms-tvselected"
NodeStyle-CssClass="ms-navitem"
NodeStyle-HorizontalPadding="2"
SkipLinkText=""
NodeIndent="12"
ExpandImageUrl="/_layouts/images/tvplus.gif"
CollapseImageUrl="/_layouts/images/tvminus.gif"
NoExpandImageUrl="/_layouts/images/tvblank.gif"
上一篇:上一篇
下一篇:下一篇

 

随机推荐程序问答结果

 

 

如对文章有任何疑问请提交到问题反馈,或者您对内容不满意,请您反馈给我们DOC100.NET论坛发贴求解。
DOC100.NET资源网,机器学习分类整理更新日期::2014-01-05 03:04:48
如需转载,请注明文章出处和来源网址:http://www.doc100.net/bugs/t/18012/
本文WWW.DOC100.NET DOC100.NET版权所有。