I have a wiki page and I want to retrieve an url of this page in an edit mode. The problem is that a url of this page in edit and display modes are the same. It doesn't change. How can I solve this problem? Thank you!
2 Answers
http://example.com/wiki/Pages/home.aspx?ControlMode=Edit&DisplayMode=Design
You need to pass the parameter ControlMode=Edit and DisplayMode=Design to the aspx page if you like to open it in edit mode.
It's the same as it always was. SharePoint 2010 just hides the parameter and change the modes using a Javascript.
-
2This dosn't work with a "Team Site"..., what do I have to do there?– StefanCommented Dec 3, 2012 at 11:40
@Stefan The page you mentioned is not a Wiki Page and its a Publishing Page(Placed in wiki Sub-site) and perhaps Publishing Pages is fine with this but for Wiki Pages that placed in SitePages Library use this query string:
?WikiPageMode=Edit&InitialTabId=Ribbon.EditingTools.CPEditTab&VisibilityContext=WSSWikiPage
When you create a new Wiki page via SharePoint 2013 UI, you will be redirected to the page with that query string.
But im not sure this will work in 2010 or all situations(If page saved one time this query string won't work anymore!).
For WebPart Pages use this query string:
?PageView=Shared&DisplayMode=Design&InitialTabId=Ribbon.WebPartPage&VisibilityContext=WSSWebPartPage