Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I need to create custom ribbon for document library. I tried creating custom ribbon button with registration id as 101, but it shows ribbon in all document library.

I also tried using content type intead of registration id, ribbon was shown only to document library using that content type.

But i had 2 document library with same content type and i need custom ribbon button in only one document library.

How to create this?

share|improve this question
    
Did you went through this sharepoint.stackexchange.com/questions/27801/… –  Muhammad Raja May 1 '13 at 14:41
    
I tried this. Ribbon was not created. –  suren May 2 '13 at 4:03

2 Answers 2

I resolved my issue by using EnabledScript property in Custom Action.

I verified whether current list is my custom list and enabled the button. For the rest of the lists the ribbon button will be shown but disabled.

I referred this link.

share|improve this answer

It is hard to scope a Custom Action more than on a content type I am afraid. Is javascript in a content editor webpart on the page that displays the one list an alternative?

See this link for all information regarding different registration types for Custom Actions http://blog.alexboev.com/2011/12/registrationtype-registrationid-in.html

share|improve this answer
    
So there is no solution for this scenario right?? –  suren May 1 '13 at 14:05
    
Not just using a Custom Action –  Robert Lindgren May 1 '13 at 14:07
    
Then how can i proceed? I need a button in document library. On clicking that button, i need to navigate to another page. –  suren May 1 '13 at 14:17
    
What was the custom action supposed to do? You could write some javascript, placed in a content editor webpart on the display page, that inserts a button to the ribbon with an onclick event calling another javascript function that does what your custom action was supposed to do :) –  Robert Lindgren May 1 '13 at 14:21
    
I need the button in ribbon. So only i choose custom actions. –  suren May 1 '13 at 14:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.