Ribbon Designer for SharePoint 2010 & Publishing Pages

Add-in Express™ Support Service
That's what is more important than anything else

Ribbon Designer for SharePoint 2010 & Publishing Pages
 
This forum has moved to a new location. From now on, please post all your questions about Ribbon Designer for SharePoint on this forum.
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
David,

PopWarner writes:
Can the ribbon tab be tied to the library item...aka the page that is has a specific content type connection and not the library?


I guess, you are asking whether it is possible to use the ID of the library in exactly the same fashion. If so, the answer is Yes: by specifying the ID of the library in the ADXSPRibbonTab.ItemType property, you add your Ribbon tab to that library.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Jun, 2012 08:16:38 Top
PopWarner




Posts: 8
Joined: 2012-06-22
Andrei Smolin writes:
I guess, you are asking whether it is possible to use the ID of the library in exactly the same fashion. If so, the answer is Yes: by specifying the ID of the library in the ADXSPRibbonTab.ItemType property, you add your Ribbon tab to that library.


Well..not so much the specific library....although that is good to know. But the Library ITEM.

So for example, lets say I have a pages library, that allows pages to be associated to one of two content types...ContentTypeA and ContentTypeB.

What I'm hoping is to create a Tab that can be say associated to just ContentTypeA and ONLY show up for pages that are using a Page Layout that is associated to ContentTypeA...BUT for those pages using Page Layouts that are associated to ContentTypeB...the tab will not show up.

What I believe is happening now is that because say the tab is connected to the GUID of ContentTypeA AND both ContentTypeA and ContentTypeB are associated to the library, the Tab will show up for either type of page simply because the existence of ContentTypeA to on the library.

Even though the some pages are using page layouts associated to ContentTypeB, because the connection of the Tab to ContentTypeA and the fact that ContentTypeA is associated with the library AND the ContentTypeB pages are in the library, it will still show up when displaying a page for ContentTypeB.

I know it sounds confusing, but I'm just assuming at this point the best way to accomplish what I want it to have Content Type specific page libraries....Was hoping for more page layout specific.

Hopefully that all makes sense what I described.

David
Posted 26 Jun, 2012 08:37:35 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
David,

Thank you. In a farm solution, you can achieve this by checking the context (SPContext.Current) and modifying the Ribbon XML in the ADXSPRibbon.OnBeforeRibbonLoad event. This event is not available for sandboxed solutions.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 26 Jun, 2012 09:18:22 Top
PopWarner




Posts: 8
Joined: 2012-06-22
Andrei Smolin writes:
Thank you. In a farm solution, you can achieve this by checking the context (SPContext.Current) and modifying the Ribbon XML in the ADXSPRibbon.OnBeforeRibbonLoad event. This event is not available for sandboxed solutions.


Is this a setting that can be set via VS using the Ribbon Designer software?

Or is there any way you could provide more detailed instructions of what you described above.
Posted 26 Jun, 2012 09:21:26 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
David,

This is part of the SharePoint object model. You'll need to write some code in VS to implement your logic. The ADXSPRibbon.OnBeforeRibbonLoad event is the right place for this code.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 27 Jun, 2012 11:25:58 Top