This tip comes from Thomas Stern, who got the tip from the Sitecore support team. I am not very well founded in the Sitecore XAML development, so I often find myself using an .aspx page to extend the Sitecore shell.
And sometimes I need my own .aspx page to open the Sitecore editor at a certain Sitecore item. I thought that was impossible, untill Thomas Stern showed me how to do that.
In order to run the Sitecore content editor from an .aspx page, you need to be logged into Sitecore in the shell domain. Then you call the Sitecore client like this:
/sitecore/shell/Applications/Content Manager/Default.aspx?fo={AA7D559F-ABA5-8F6A-ABCD-0ABDF7E74EE1}
This opens the Sitecore editor at the item specified in the “fo” parameter.
There are more parameters:
/sitecore/shell/Applications/Content%20Manager/default.aspx?fo={id}[&la={language}][&vs={version}]&mo=preview
- fo = The item to open the Sitecore editor at
- la = The language to open
- vs = The version to open
- mo=preview. This parameter removes the content tree at the left side.
To open the Sitecore editor in a new window by clicking a button from your own .aspx page, you can do the following: Create an ordinary asp:Button control and extend the OnClientClick property:
Item myItem = MySitecoreItemToOpen();
myButton.OnClientClick = "javascript:window.open('/sitecore/shell/Applications/Content Manager/Default.aspx?fo=" + myItem.ID + "'); return false;";