mercredi 25 mars 2015

Does adding a web part to a page make a copy of the web part definition?



The setup: - Custom Summary Link web part - Custom SummaryLinkMain.xsl - Custom ItemStyle.xsl - JavaScript file that the SummaryLinkMain calls from a separate site collection (an internal CDN) and uses in the ItemStyle.


From what I've seen, it seems like adding a web part to a page makes a copy of that web part on the page, including its *.webpart definition. This is causing issues because we have a bug where we have to change a custom Summary Link web part definition (.webpart) to point to a new SummaryLinkMain.xsl stylesheet so it can load the above JS file properly.


However, just updating our custom .webpart file DOESN'T seem to update the EXISTING custom web parts we've already put onto our pages. It looks like we'd have to go through dozens of pages and reinsert the web parts in order for them to get the updated web part definition.


(A): Does SharePoint make a copy, or is it possible for a change to the web part definition to filter down to all existing web parts that were spawned from that definition?


(B): If A doesn't happen, is there a way to force refresh of all the web parts somehow? Obviously we're trying to avoid a lot of work in rebuilding them all.


Thanks!








0 commentaires:

Enregistrer un commentaire