Try our conversational search powered by Generative AI!

On-page editing outside CMS admin

Vote:
 

I have a requirement that some registered users with specific role should be able to create articles, but they should not have access to CMS administration UI. Is there any built-in feature to support such case? As I remember EPiServer CMS 6 had on-page editing without CMS menus etc.

Currently I see only option to create custom page from where user posts all fields required to create article pages, but it duplicates CMS editing features for article page type.

#118429
Mar 06, 2015 9:06
Vote:
 

Had a simular request ones. Belive I used quick publish to solve it that time. 

#118430
Mar 06, 2015 9:47
Vote:
 

The article about quick publish is for EPiServer 6, but I am using EPiServer 7.5/8.

Another option I am looking at is to allow those users to access CMS, but hide as much as possible of admin features.

I already got to showing only pages with Edit access in the page tree as described in this article: http://tedgustaf.com/blog/2013/4/hide-pages-in-the-page-tree-in-episerver-7/

#118470
Edited, Mar 06, 2015 16:24
Vote:
 

Hi Maris!

Since the EPiServer 7 editing interface is much more advanced and the parts fit together, for instance giving the ability to drag and drop pages and media into the editors, we decided to abandon the somewhat two more simplified editing "modes" that existed in EPiServer CMS 6, on page edit and simple editing. You can modify the views to suite certain roles as described here: 

http://world.episerver.com/blogs/Linus-Ekstrom/Dates/2013/2/Modifying-the-EPiServer-UI-views/

Also, I can mention that I'm somewhat helping out on a prototype project to add templates to EPiServer. The idea is to have an gadget with templates and to be able to create new items from the templates, for instance "New article", "New news page" etc. This is still in early prototyping but is might be something that could solve this need, combined with a modified view.

#118567
Mar 10, 2015 11:10
Vote:
 

Thanks Linus!

It seems that allowing those users to access admin mode is fine and could be adjusted as needed with these solutions:

http://tedgustaf.com/blog/2013/4/hide-pages-in-the-page-tree-in-episerver-7/

http://world.episerver.com/blogs/Linus-Ekstrom/Dates/2013/2/Modifying-the-EPiServer-UI-views/

Also I am building the page to help users to start page creation by filling required values and after page creation redirect to edit mode. Now I need to get the page Edit URL.

Is there any builtin method to get page Edit URL?

#118568
Edited, Mar 10, 2015 11:17
Vote:
 

The class EPiServer.Cms.Shell.IContentExtensions has a number of extension methods you can use. GetUri is the simplest and will create a URI for the current mode (site, preview or edit). There is also more specific methods that will give you more control, such as getting the URL for a pre-defined mode.

#118570
Mar 10, 2015 11:34
Vote:
 

Just tested - GetUri works great!

Here is the sample:

using EPiServer.Cms.Shell;

...

var newPage = _contentRepository.GetDefault<PageData>(parentLink, contentType.ID, LanguageSelector.AutoDetect());
newPage.Name = "Page name";
_contentRepository.Save(newPage, SaveAction.Save);

var editUri = newPage.GetUri();

...
#118572
Mar 10, 2015 11:49
Vote:
 

Actually GetUri did not work as I wanted. It returns only part of edit URL. For example, "epi.cms.contentdata:///1995_5754".

I did some research and found solution in ContentSearchProviderBase constructor. Using this solution created extension method which returns full edit URL:

public static string GetEditUrl(this IContent content, string languageName = null, bool relativeUrl = true)
{
	var cmsEditUrl = GetSiteEditUrl(relativeUrl);

	var contentEditUri = content.GetUri(true);

	return !string.IsNullOrWhiteSpace(languageName) 
		? string.Format("{0}?language={1}#context={2}", cmsEditUrl, languageName, contentEditUri) 
		: string.Format("{0}?#context={1}", cmsEditUrl, contentEditUri);
}

private static string GetSiteEditUrl(bool relativeUrl)
{
	var cmsEditUrl = SiteDefinition.Current.GetFullUrlToEditView(null);
	return relativeUrl 
		? new Uri(cmsEditUrl).PathAndQuery 
		: cmsEditUrl;
}
#118583
Mar 10, 2015 13:50
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.