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?? 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. 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. Commented May 1, 2013 at 14:23

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.