How to add a webpart to every document library (existing and future)
I'm working on a webpart for SharePoint 2010 and I would like to know how to 开发者_开发问答config it to work in every existing and future document library. It won't be good for the project to add it every time a new document library is created.
Any ideas?
- You need to create a custom List Definition which will include its own AllItems.aspx with your custom web part embedded.
However, this will work if you create the library of this template in future not for others.
- Other solution could be to have your web part as a web server control and include it in your master page. This way, the control can find out if there is any
ListView
web part is present on page.
精彩评论