English 中文(简体)
Hide my new menu in some document Library
原标题:Hide my new menu in some document library
  • 时间:2010-04-15 12:57:48
  •  标签:
  • sharepoint

我写了新菜单添加习惯菜单的内容(范围)。 它将在文件图书馆内制作新的文件。

以下是特征和特征清单档案中的样本条目。

<?xml version="1.0" encoding="utf-8" ?>
<Feature Id="59bba8e7-0cfc-46e3-9285-4597f8085e76" Title="My Custom Menus" Scope="Site" xmlns="http://schemas.microsoft.com/sharepoint/">
<ElementManifests>
<ElementManifest Location="Elements.xml" />
</ElementManifests>
</Feature>

零件

<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<CustomAction Id="NewMenu1" GroupId="NewMenu" RegistrationType="List" RegistrationId="101" Location="Microsoft.SharePoint.StandardMenu" Sequence="1002" ImageUrl ="/_layouts/images/DOC32.GIF" Title="My New Menu" Rights="AddListItems,EditListItems">
<UrlAction Url="javascript:var surl= {SiteUrl} ; window.location= /test/mypage.aspx?siteurl= +surl+ &amp;listid={ListId}&amp;Source= +window.location" />
</CustomAction>
</Elements>

以上样本。 我的新菜单被列入所有文件图书馆。 这一新的菜单正在文件图书馆下制作新的文件。 但是,我不得不把这一点藏在一些文件图书馆。 这是可能的吗? 我建议我。

问题回答

你可以通过在内容编辑的网站上增加一些java文字来掩盖像这样的菜单。 内容编辑部分应放在你网页上,你希望把菜单项目隐藏起来。

举例如下:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>

<script type="text/javascript">

$(document).ready(function(){ 
   $("ie\:menuitem[text= My New Menu ]").each(function(){
       this.hidden=true;
   });
});

</script>

HTH





相关问题
SharePoint - Approaching Website Storage Limit Email

How can i go about changing the distribution list as well as the email text for the email that goes out to site collection admin when a site collection approaches it s size limit? Thanks for your ...

UI automated testing within SharePoint

I m looking for automated Functional Testing tools that can manipulate SharePoint sites, libraries, and documents thought the web interface. It needs to be extensible enough to handle any custom ...

Enable authorization on sitemap provider

I want to enable Authorization on the Site map provider. We have enabled anonymous access to the site and we want the Site map provider to be visible only to authorized users. I tried ...

SharePoint : web service permission error

I have a sharepoint site, and I am calling a standard sharepoint web service. I create the web service request like this : wsDws.Url = this.SiteAddress + @"/_vti_bin/Dws.asmx"; When I use ...

Sharepoint 2007 Data view Webpart custom parameters

I m sort of new to the custom parameters that can be setup on a DataView Webpart. There are 6 options: - None - Control - Cookie - Form - QueryString - Server Variable I think that None, Cookie and ...

热门标签