How to synchronize fields "DisplayName" and "Name in Url"

Vote:
 

Hi.

I have a problems with synchronization fields "DisplayName" and "Name in Url".(Episerver-commerce-catalog). I want that field "Name in Url" was formed by using field "DisplayName". How is it do better?

#114474
Dec 12, 2014 13:08
Vote:
 

I work with Episerver 7.5 and MVC

#114476
Dec 12, 2014 13:12
Vote:
 

When you manually edit the product, you can clear "Name in URL" and it will automatically be calculated from Name when you publish. There is no connection between Display name and Name though.

#114629
Dec 16, 2014 15:44
Vote:
 

I resolved this issue so:

1. Add additional fields to form(commerce - catalog - new -category). - Inherite from class NodeContent and add properties with attribute [Required].

2. Subscribe to events CreatedContent of IContentEvents.

3. Checke that e.Conten is MyNodeContent.

4. GetLanguageBranches and CreateWritableClone

5. Change fields "Display Name" and "Name in Url" using values of additional fields and save(myRepository.Save)

#114772
Dec 20, 2014 13:58
* 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.