Make PageName property not editable in UI

Vote:
 

Hi!

 

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? :)

 

Thx!

 

 

#52413
Jul 22, 2011 11:30
Vote:
 

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:

http://world.episerver.com/Blogs/Deane-Barker/Dates/2010/9/Automatically-Naming-Pages/

 

#52415
Edited, Jul 22, 2011 15:07
Vote:
 

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;
           
        }
        #endregion

#52417
Edited, Jul 22, 2011 16:10
Vote:
 

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

#52418
Jul 22, 2011 16:27
Vote:
 

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

#52419
Jul 22, 2011 16:34
Vote:
 

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

#52420
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.