Hey all,
I'm using MOSS 2007. I've been trying to find a way to link straight to a Publishing Page in editing mode, e.g. sending people an e-mail with a link asking them to edit the page. Sharepoint does not appear to have an option for this, so I figured I'd create a small control that would check the querystring for a parameter (editmode=true), it would switch into edit mode.
So I create a control that OnInit does the following:
I also do some checks to make sure the file is checked out, and if not, gets checked out.
The problem with this solution: Microsoft.SharePoint.Publishing.WebControls.EditmodePanels turn out to read the FormMode before I ever get the chance to set it. EditmodePanels are used extensively in my page layouts so this is a real problem.
Does anyone know how to get this working the way I need it to? Is there maybe a simpler way to achieve an edit link?
Thanks,
Menno
I'm using MOSS 2007. I've been trying to find a way to link straight to a Publishing Page in editing mode, e.g. sending people an e-mail with a link asking them to edit the page. Sharepoint does not appear to have an option for this, so I figured I'd create a small control that would check the querystring for a parameter (editmode=true), it would switch into edit mode.
So I create a control that OnInit does the following:
Microsoft.SharePoint.SPContext ctx = Microsoft.SharePoint.SPContext.Current; |
ctx.FormContext.SetFormMode(Microsoft.SharePoint.WebControls.SPControlMode.Edit, true); |
I also do some checks to make sure the file is checked out, and if not, gets checked out.
The problem with this solution: Microsoft.SharePoint.Publishing.WebControls.EditmodePanels turn out to read the FormMode before I ever get the chance to set it. EditmodePanels are used extensively in my page layouts so this is a real problem.
Does anyone know how to get this working the way I need it to? Is there maybe a simpler way to achieve an edit link?
Thanks,
Menno