Try our conversational search powered by Generative AI!

Set Page Name to a property field on the page


I have a location page which needs a name that corresponds to the street address. I do not want my users to have to add the address twice. Is there any way in Epi 7 to set up so when they create a page (of a specific page type only) they are not faced with having to enter a "Name" but only the "Address"? So either the Address field renames the page or instead of a Name label they get Address.


May 18, 2015 15:15

The name property is the property that define the name of the content and that are used all over EPiServer so it is required to be set.

You can update it when the user saves/published the content, all you have to do is to listen to the event onpublishingpage (or something like that, important is that it's the publishing/saving event that takes place before the content is saved to the database)

in the function that listen to the event you check if it is the location pagetype and if it is, you set the Name property there.

May 18, 2015 15:38
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.