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.
David Warner II




Posts: 8
Joined: 2012-06-22
Greetings all,

I'm currently testing out the software and so far things are going well.

One of the main needs for using the Ribbon Designer though is to perform client side JS functionality when users are editing a page...mainly a Publishing Page.

Can you tell me how to get my custom ribbon to show up on Publishing Pages when the page is being edited?

I am able to successfully deploy a sample tab and button using the end to end video demo for lists, but do not see the content types in the list that support say page layouts like the "Welcome Page" page layout. Ideally that is how I would have them display, based on the page layout Content Type.

Perhaps this is not possible or I'm just not looking in the right place.

Thanks in advance,

PopWarner
Posted 22 Jun, 2012 09:57:32 Top
Andrei Smolin


Add-in Express team


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

David Warner II writes:
Can you tell me how to get my custom ribbon to show up on Publishing Pages when the page is being edited?


I'll try to find an answer on Monday.

I've just tested this on my PC: Welcome Page requires using such a tab:

            this.adxspRibbonTab1.Caption = "SPRibbonProject19.csproj";
            this.adxspRibbonTab1.Controls.Add(this.adxspRibbonGroup1);
            this.adxspRibbonTab1.Id = "adxspRibbonTab1";
            this.adxspRibbonTab1.ItemType = "WikiPageLibrary";
            this.adxspRibbonTab1.JSVarName = "adxspRibbonTab1";
            this.adxspRibbonTab1.Ribbons = AddinExpress.SharePoint.ADXSPRibbons.DisplayForm;


Is this what you are asking about?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 22 Jun, 2012 10:40:02 Top
PopWarner




Posts: 8
Joined: 2012-06-22
Perhaps this is what I need as the ItemType: WikiPageLibrary

I will try what you put. I was able to get it to show up when I selected "Document" as the ItemType. But this obviously is too generic. It will show up for any document in any document library. It just so happens that publishing page is a document in a library, so thats why its showing up.

But my thoughts are what if I need something to show up for a custom content type. If I create my own custom page layout content type that is a child of say page. How would I identify the tab should only show up on pages that use a page layout using that content type?

Thanks and I look forward to your reply. :)
Posted 22 Jun, 2012 10:45:21 Top
Andrei Smolin


Add-in Express team


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

If a Ribbon is added onto a page, it will also be visible when you edit the page.

I've just used Microsoft SharePoint Designer to create a custom content type. Then I created a list and added the content type to the content types of the list.

In ADXSORibbonTab.ContentType, I specified the ID of the content type and - wow! - the Ribbon is shown in the list.

Regards from Belarus (GMT+3),

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




Posts: 8
Joined: 2012-06-22
Andrei,

Thank you for the reply. Can you tell me what exact ID you used for the Content type? Was it the GUID?....and how did you input it into the Ribbon interface? Sorry for needing the info in more granular detail, but I'm more of a UI developer and looking to leverage the tool from that perspective.

So this means I will be using it for specific publishing pages that have use a specific content type.

Thank you and very excited for the reply.

David
Posted 25 Jun, 2012 08:32:36 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
It was an ID of this type: 0x0108009E0B1ECBAD47074E84BBC8BD8328650E (note that you will get a different value).

Here's how to find it in Microsoft SharePoint Designer:

- start Microsoft SharePoint Designer and open your site
- under "Site Objects" click "Content Types"
- in the right pane, click the custom content type
- in the right pane, select and copy the ID

Now, on how to modify a list or library to support a custom content type:

- start Microsoft SharePoint Designer and open your site
- under "Site Objects" click "Lists and Libraries"
- in the right pane, click the list or library
- tick the checkbox "Allow management of content types"
- click the button "Add...", see to the right of "Content Types"
- the rest is obvious.

And for the sake of completeness (well, sort of), here's how you create a custom content type:

- start Microsoft SharePoint Designer and open your site
- under "Site Objects" click "Content Types"
- in the Ribbon UI, activate the "Content Types" tab and click the appropriate button.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 25 Jun, 2012 09:01:37 Top
PopWarner




Posts: 8
Joined: 2012-06-22
Thank you for the reply. So I'm definately comfortable on setting up a new Content type and assigning it to my page layouts, assigning it to lists and libraries and finding the custom guid that you have identified.

I guess my question is, is the GUID that was assigned to your Content Type what you applied to your Ribbon tab in teh ItemType property?

What I'm looking for is when in VS, when I create a new tab, in the properties area, ItemType has a dropdown list of Content Types. Of course I do not see any of my custom content types or even the "Welcome Page", "Article Page" oob either.

So is this where I put the custom GUID of my custom content type?

Thanks,

David
Posted 25 Jun, 2012 09:36:24 Top
Andrei Smolin


Add-in Express team


Posts: 14137
Joined: 2006-05-11
Exactly.

// 
// adxspRibbonTab1
// 
this.adxspRibbonTab1.Caption = "adxspRibbonTab1";
this.adxspRibbonTab1.Controls.Add(this.adxspRibbonGroup1);
this.adxspRibbonTab1.Id = "adxspRibbonTab1";
this.adxspRibbonTab1.ItemType = "0x0108009E0B1ECBAD47074E84BBC8BD8328650E";
this.adxspRibbonTab1.JSVarName = "adxspRibbonTab1";


Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 25 Jun, 2012 09:47:56 Top
PopWarner




Posts: 8
Joined: 2012-06-22
Awesome. I will give that a try and see how it goes. Will let you know.

Thanks,

David
Posted 25 Jun, 2012 09:54:49 Top
PopWarner




Posts: 8
Joined: 2012-06-22
Thanks again for the upd ate. Good news...bad news. LOL

Using your method, I got it to work. I started out testing just OOB Content Types. So I took the "Welcome Page" CT Guid and pasted that in as a list type. I then went into my page and changed the page to use a page layout that was based on the "Article Page" content type, YET the custom tab was still showing up.

So then I thought...hmmm...ok, so lets look at the page library se ttings. The pages library had both the Page, Welcome Page and Article Page associated to the library. So what I did is removed the Welcome Page content type and refreshed the page and the Tab had been removed....as expected.

I went in and redeployed the sample tab, this time giving it the GUID of the Article Page Content type. Refreshed the page and viola, it showed up again...as expected.

It seems that the tab is tied to the list/library content type and not the contents of the library.

So this gets me half way there I guess. IF I can ensure that the pages library will ONLY ever have a specific or custom content type, then this solution would work great.

BUT this seems less then likely. Most people don't have content type specific pages libraries, but rather have one pages library that houses all kinda of pages.

So while I could see making this work if its my only option, my question is this. 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?

Thanks,

David
Posted 25 Jun, 2012 11:33:01 Top