0

I have SharePoint Site on SharePoint online with Pages library having 5 pages with content. Need to modify the URL in the pages programmatically using Client Object Model

suppose I have Newname.aspx page and this page is having some links which I need to modify pragmatically. Newname.aspx is having 15 broken links, every time I have to open this page in edit mode and manually update all broken links.

Is there any way to modify these broken links programmatically.

1
  • Is there any way to update the Broken links in the page
    – user53451
    CommentedMay 2, 2016 at 10:08

1 Answer 1

0

It depends :)

if these columns are just fields that you added on the page content type or on the page library itself and they are added on the page layout, then it is as easy as update the columns with the link you like.

I believe this is not the case, and the links are stored as a part of the page content field. This will require to search and replace the column using java script or even console app (if you are using 2010 or 2013 on prem)

here is an example using the console app: http://habaneroconsulting.com/insights/programmatically-change-content-on-a-wiki-page-in-sharepoint-2010#.VytcZYSDFBc

example using javascript (look for the Update a file in a document library section): https://msdn.microsoft.com/en-us/library/office/jj163201.aspx

    Start asking to get answers

    Find the answer to your question by asking.

    Ask question

    Explore related questions

    See similar questions with these tags.