Sharepoint Foundation 2010:完全隐藏功能区
我正在尝试在 Sharepoint Foundation 2010 中设置母版页的样式。我正在使用 nightandday 母版和样式。
该设计没有功能区,我只需将其关闭。只是普通的旧关闭。当我将功能区 div 设置为显示时:没有,整个顶部横幅消失了。
我不是共享点开发人员,并且一般都迷失了方向。有没有一种简单的方法可以隐藏/删除功能区?没有什么需要的权限 - 只是需要始终消失。 。
I am trying to style the master page in Sharepoint Foundation 2010. I"m using the nightandday master and styles.
The design has no ribbon and I just need to turn it off. Just plain old off. When I set the ribbon div to display: none, the entire top banner disappears.
I'm not a sharepoint dev and am lost in general. Is there an easy way to just hide/get rid of the ribbon? Nothing fancy about permissions required--just needs to be always gone.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
您想要查看的 CSS 类是:
The CSS classes you want to look at are;
您应该能够使用本文中的信息来入门。
http://www. endusersharepoint.com/2010/11/09/hiding-the-sharepoint-2010-ribbon-from-anonymous-users/
You should be able to use the information in this article to get you started.
http://www.endusersharepoint.com/2010/11/09/hiding-the-sharepoint-2010-ribbon-from-anonymous-users/
如果有人一直在解决这个问题。隐藏功能区可能会导致一些进一步的问题 (http://social.msdn.microsoft.com/Forums/en-US/9422aa0f-5010-4691-a0ab-25e7aca6b478/issue-with-div-s4workspace-and-滚动条)
特别是如果您要包含自己的标题并隐藏功能区。
一个快速的解决方法是使用 css。 #s4-workspace 仍将收到正确的高度和高度滚动条不会成为问题,功能区也会被隐藏。:
In case someone has been struggling with this issue. Hiding the Ribbon may cause some further issues (http://social.msdn.microsoft.com/Forums/en-US/9422aa0f-5010-4691-a0ab-25e7aca6b478/issue-with-div-s4workspace-and-scroll-bar)
Especially if you will include your own header and hide the Ribbon.
A quick workaround is using css. #s4-workspace will still receive the correct height & scrollbar won't be an issue as well as the ribbon will be hidden.:
正如 Knight0323 答案的链接页面中所述,可以通过编辑
v4.master
并用
包裹功能区 div 来隐藏功能区:不幸的是在我的系统上,这会产生副作用,页面的滚动条开始出现异常行为。这似乎是功能区和 s4-workspace div 之间依赖关系的结果。因此,为了解决此问题,我将
从功能区 div 移入以包裹并添加
v4.master
顶部附近的以下标记:这样做的效果是默认情况下隐藏功能区,但 DOM 中保留足够的标记,以便页面继续正常运行。对于管理员来说,功能区正常显示。
As documented in the linked page of knight0323's answer, the ribbon can be hidden by editing
v4.master
and wrapping the ribbon div with<SharePoint:SPSecurityTrimmedControl/>
:Unfortunately on my system this has a side-effect where the page's scroll-bar starts misbehaving. This appears to be a result of a dependency between the ribbon and the
s4-workspace
div. So to resolve this I moved<SharePoint:SPSecurityTrimmedControl/>
in from the ribbon div to wrap the<div id="s4-ribboncont">
and added the following markup near the top ofv4.master
:The effect of this is that the ribbon is hidden by default but sufficient markup remains in the DOM so the page continues to behave correctly. For administrators, the ribbon is displayed normally.
如果其他人遇到这个问题,这里有完整的说明,可以在不破坏滚动条或丢失标题栏区域或任何其他奇怪情况的情况下执行此操作:
隐藏不丢失标题栏区域的 Sharepoint 2010 功能区
In case anybody else is struggling with this, here are full instructions to do this without breaking the scroll bar or losing the title bar area, or any other oddities:
Hiding a Sharepoint 2010 ribbon that does not lose the titlebar area