I’d like to edit my Sharepoint Wiki content programmatically. One of the advantages would be to add indexes to the Wiki environment automatically.
Has anyone been able to do this? Language doesn’t matter, but looking for scripting solution.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
A SharePoint wiki is just a special type of document library. There’s just a few oddities I’ve run into when trying to do this.
A SharePoint wiki page consists of a template file and a list item. When you view the page, fields from the list item are inserted into the template file. So to update a wiki page, you just have to update the correct fields in the list item. (Incidentally, that also means you can’t get at the original template like you could a file in a normal document library. So far, the only way I’ve found to get the template itself is to download it through SharePoint Designer.)
Also, SharePoint automatically renders the wiki content when you access the list item programmatically. So, I was never able to get the content that contained ‘[[My Link Name]],’ for example–SharePoint would always return the rendered HTML instead, like:
With a little regex work you should be able to convert this back to the original wiki content, though.