0

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?

2

2 Answers 2

1

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.

0

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

7
  • So there is no solution for this scenario right??
    – Suren
    Commented May 1, 2013 at 14:05
  • Not just using a Custom Action Commented May 1, 2013 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
    Commented May 1, 2013 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 :) Commented May 1, 2013 at 14:21
  • I need the button in ribbon. So only i choose custom actions.
    – Suren
    Commented May 1, 2013 at 14:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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