5

Is there a way to go in and edit a set of webparts in bulk, instead of one by one? We've got a site with roughly 75 pages with an average of 3 webparts per page. Each of those webparts have a section to reference 3 XML files, in which case the links for every XML file is pointing to the wrong culture.

Is there a quick way to edit these in bulk? It would be nice if there was some sort of data-list view of the webparts with their properties so I could essentially do a find/replace on the culture.

Any tips?

  • 1
    PowerShell or a C# application come to mind. It would be custom but it could do the trick. Do you have more details about what you are trying to do? What web parts? What SharePoint version? Etc. – shufler Nov 29 '11 at 18:34
  • Are the webparts the same Type? And are we talking web part pages or Publishing Pages? – James Love Nov 29 '11 at 18:35
  • It's a publishing site. They're smartparts that use a custom .net control for binding/rendering xml/xsl. The Smartpart basically takes in a CSS location, JS location, XML location, and XSL location to spit out on the page. – snowBlind Nov 29 '11 at 20:12
4

You can create a powershell script that will get your webparts on a specific page using SPLimitedWebPartManager class - http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webpartpages.splimitedwebpartmanager_members.aspx and change settings, you can see a simple example here - http://aarebrot.net/blog/2010/09/changing-the-properties-of-an-existing-web-part-using-powershell/

  • Thanks for this. Looks like with some tweaking this could do the job. – snowBlind Dec 2 '11 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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