使用feature隐藏sharepint 2013 菜单选项,比如“网站内容”

gaoxingstyle gaoxingstyle 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction
Location="ScriptLink"
ScriptBlock="
function loadjQueryScripts(src) {

var head = document.getElementsByTagName('head')[0];
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = src;
head.appendChild(script);
}
function hideSiteActions() {
var menuItems = document.getElementsByTagName('ie:menuitem');
for (var key in menuItems)
{
if (key.endsWith('ViewAllSiteContents'))
menuItems[key].hidden = true;
}
}
_spBodyOnLoadFunctionNames.push('hideSiteActions');
"
Sequence="10001">
</CustomAction>
</Elements>

可js代码并没有做到这隐藏这一点。在sp2013里面隐藏菜单选项,该怎么隐藏,请求帮助。(只允许用feature)
...全文
评论 11
收藏 已收藏
分享
返回顶部
gaoxingstyle
SharePoint 3,245 成员 4,605 内容