如何将 HTML 元素添加到 SharePoint 2010 功能区区域
我正在尝试编辑 SharePoint 2010 功能区以在选项卡旁边添加链接。所以我只想将元素恰好放在“浏览”和“页面”选项卡的右侧。它们看起来应该像其他选项卡,但它们的功能类似于链接。
我在网络上进行了广泛的搜索,试图适应这一点,但我不确定答案是编辑自定义母版页还是通过 Visual Studio 部署某些内容。无论哪种方式,我都无法让某些东西出现在该区域。
下面是它可能的样子的屏幕截图。
此外,任何将用户及其菜单移至左侧的帮助也将不胜感激。
I am trying to edit the SharePoint 2010 ribbon to add links along side the tabs. So I would want to just have elements exactly to the right of the 'Browse' and 'Page' tabs. It should look like they are other tabs, but they will function like links.
I have searched the web extensively to try and accommodate this, and I'm not sure if the answer is editing a custom master page or deploying something through Visual Studio. Either way, I am unable to get something to appear up in that area.
Below is a screen shot of what this might look like.
Also, any help with moving the user and their menu to the left would also be much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
SharePoint 不允许您以这种方式修改功能区。您必须使用 jQuery 或类似工具将新列表项 (li) 添加到选项卡无序列表 (ul)。您可以使用 firebug 找到该列表:
请注意,不推荐此类解决方案(难以维护、不受支持,并且这可能在下一版本的 SharePoint 中不起作用)。
要将用户和菜单移至左侧,只需通过 SharePoint 设计器重新排列 v4 母版页副本中的控件即可。
SharePoint won't allow you to modify the ribbon in this way. You will have to use jQuery or similar to add a new list item (li) to the tabs unordered list (ul). You can find the list with firebug:
Please note that this kind of solutions are not recommendable (Hard to maintain, unsupported, and this probably won't work in the next version of SharePoint).
To move the user and the menu to the left, just rearrange the controls in a copy of the v4 master page through SharePoint designer.
@阿方索是对的。只是为了为其他可能想要使用 jQuery 添加选项卡的人添加更多
内容,这将在“页面”选项卡的右侧添加一个项目
@alfonso is right. Just to add more for others who might want to add the tabs using jQuery
That will add an item to the right of the "page" tab