As the question says - is there a way to determine which pages are including my web part?
相关问题
- Sharepoint multiple connections to a web parts
- Trouble with OR in Sharepoint CAML
- List Microsoft Sharepoint Sites with Microsoft Gra
- How to use VBA or Powershell to export lists from
- redirect using itemreceiver sharepoint
相关文章
- File Upload to SharePoint 2013 using REST API
- Passing file object to Web API from Javascript
- How can I iterate recursively though a sharepoint
- SharePoint, VirtualPathProviders and Application R
- Saving a document to SharePoint brings up “Web Fil
- SharePoint SOAP GetListItems VS jQuery - How to us
- Trying to upload files to subfolder in Sharepoint
- Sharepoint client GetFolderByServerRelativeUrl fol
If you're looking for code, I've got something for you. If you'd like to find all Content Query web parts then you would call my code like this:
Here's the code:
Ofcourse you can make little changes to this code. Currently it does a string comparison, but it's easy to do it in a more typed way. Have fun!
By way of an alternative, if you want to test web part pages including the default page on collaboration sites, you can use the following code snippet which uses the Files property of the SPWeb object:
Note: the Pages library created by the Publishing feature does not have a BaseTemplate value of SPListTemplateType.DocumentLibrary; instead it is represented by a "hidden" value of 850.
This is called a similar manner to LeonZandman's answer, however only the class name is used to supply a match: