November Happy Hour will be moved to Thursday December 5th.

Set Page Name to a property field on the page

Vote:
 

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.

Thanks!

#121822
May 18, 2015 15:15
Vote:
 

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.

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