显示用户名但隐藏 SharePoint 功能区上的其他所有内容
在 SharePoint 2010 上,我能够弄清楚如何在母版页上使用以下代码隐藏 SharePoint 功能区链接(网站操作 -- 页面 -- 浏览):
<SharePoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="ManageLists">
<SharePoint:SPRibbon>
...
</SharePoint:SPRibbon>
</SharePoint:SPSecurityTrimmedControl>
但这也隐藏了域\用户名
我应该将代码放在哪里隐藏除用户名之外的所有内容? 我可以创建多个 TrimmedControl。
On SharePoint 2010 I was able to figure out how to hide the SharePoint Ribbon links (site actions -- page --browse) with the following code on the master page:
<SharePoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="ManageLists">
<SharePoint:SPRibbon>
...
</SharePoint:SPRibbon>
</SharePoint:SPSecurityTrimmedControl>
But this also hides the domain\username
Where do I put the code to hide everything except the username?
I am ok with creating more than one trimmedControl.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以简单地使用 Sharepoint Designer 2010 打开母版页并添加 Asp.Net:LoginName 控件而不是 SharePoint 功能区,如下所示,
希望对
您有所帮助。
You can simply open your Master Page using Sharepoint Designer 2010 and add Asp.Net:LoginName control instead of SharePoint Ribbon as following
I hope that help
Regards.
我相信这是母版页中您不想隐藏的控件:
I believe this is the control in the master page that you want to not hide:
像这样隐藏功能区
然后在代码中搜索标记告诉您的
行将上面的行复制并粘贴到母版页中占位符内的任意位置。我所做的只是在表格中添加一个新的
Hide your ribbon like this
Then search your code for the line Mark told you
Copy and paste the above line anywhere inside a placeholder in the master page. All I did was add a new
<td>
in the table