How to list and edit html of all web part in sharepoint 2007? -
i new in sharepoint , have simple modification in web part. have lots of web part containing simple html. html contain link , image.
web developers had put full links pages , images , cause problems. want scan of web parts html , replace full links relative links.
is possible ? have tons of pages , links. doing manually take 2 weeks!!!
thanks!
edit #2: question is: possible list aspx files in website? know how access web parts content url :
using (splimitedwebpartmanager manager = web.getlimitedwebpartmanager( "ca/pages/home.aspx", personalizationscope.shared)) { foreach (system.web.ui.webcontrols.webparts.webpart wp in manager.webparts) { system.console.writeline(wp.title); if (wp.gettype().equals(typeof(microsoft.sharepoint.webpartpages.contenteditorwebpart))) { microsoft.sharepoint.webpartpages.contenteditorwebpart thiswebpart = wp microsoft.sharepoint.webpartpages.contenteditorwebpart; system.console.writeline(thiswebpart.content.innertext ); system.console.writeline(thiswebpart.content.innerxml); } } }
edit #1: requested example:
i want remove "http://www.mywebsite.com" shared webparts code this:
<a title="" href="http://www.mywebsite.com/pages/career.aspx" target=""><img style="border-right: 0px solid; border-top: 0px solid; border-left: 0px solid; border-bottom: 0px solid" src="http://www.mywebsite.com/images/career.jpg" border=0></a>
in content editor web part content stored under content tag
<content xmlns="http://schemas.microsoft.com/webpart/v2/contenteditor"><![cdata[<p>test document test document</p>]]></content>
what can suggest here open site in sharepoint desginer , use find , replace option pages
Comments
Post a Comment