Try our conversational search powered by Generative AI!

Make PageName property not editable in UI




Im trying to set the PageName property not etidable for users in the UI.

I´ve been googleing all morning without success.. How can I do this? :)





Jul 22, 2011 11:30

The page name is required so you need to set it to something. This post explains how to hide it and use logic to programmatically set it:


Edited, Jul 22, 2011 15:07

I create the page programatically and set the pagename programatically so thats not the problem. I just simply want to hide the property from editing for users. The post is exactly what I want but it doesnt work for me..

I´ve added this code into global.asax.cs but it doesnt seem to work :/


public class Global : EPiServer.Global {
        #region protected void Application_Start(object sender, EventArgs e)
        protected void Application_Start(object sender, EventArgs e) {
            UrlSegment.CreatedUrlSegment += UrlSegment_CreatedUrlSegment;

            EditPanel.LoadedPage += new LoadedPageEventHandler(EditPanel_LoadedPage);
        protected void EditPanel_LoadedPage(EditPanel sender, LoadedPageEventArgs e)
            e.Page.Property["PageName"].DisplayEditUI = false;

Edited, Jul 22, 2011 16:10

Have you tried debbuging to ensure the LoadedPage event is firing OK?

Jul 22, 2011 16:27

hmmm, it seems Im not able to run the global.asax.cs file itself :P How do I do this? :)

Jul 22, 2011 16:34

Set a breakpoint on the line of code in question and start debugging?

Jul 22, 2011 17:19
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.