2010-10-12 83 views

回答

3

手動顯示標籤,我發現設置RegistrationType到ContentType和RegistrationID到0x解決了這個問題。 0x對應於內容類型「Item」,所以這將適用於所有類型的列表,即使是沒有啓用內容類型管理的列表。

0

我沒有一個簡單的方法來測試這一點,但我相信你會根據該Custom ActionRibbon模式像往常一樣定義Elements.xml文件,但省略了CustomAction元素的RegistrationIdRegistrationType屬性:

<Elements xmlns="http://schemas.microsoft.com/sharepoint/"> 
    <CustomAction 
     Id="[Your.Ribbon.ID.Here]" 
     Location="CommandUI.Ribbon.[Your.Location]"> 
      <!-- Your Ribbon Definitions Here --> 
    </CustomAction> 
</Elements> 
0

有在SharePoint網站溢出

http://www.sharepoint.stackexchange.com/questions/6158/how-do-you-create-a-ribbon-button-custom-action-that-will-appear-on-all-kinds-of

另外幾個答案,我想CBono的一個轉向幾個不同的方式,但不能得到它的工作。我認爲,如果你刪除RegistrationType和RegistrationId,你需要使用代碼

SPRibbon ribbon = SPRibbon.GetCurrent(this.Page); 
if (!ribbon.IsTabAvailable("Ribbon.CustomTabExample")) { 
    ribbon.MakeTabAvailable("Ribbon.CustomTabExample"); 
} 

更多信息這些鏈接

http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/390e3409-eba6-4674-9095-c29efcd9bd04

http://msmvps.com/blogs/cobrien/archive/2010/01/25/adding-ribbon-items-into-existing-tabs-groups-ribbon-customization-part-2.aspx

相關問題