Try our conversational search powered by Generative AI!

Convert single page PageType to another PageType programically



i found the topic where there is described that we could migrate single page to another pagetype.

My question is --> there is talking about " List<KeyValuePair<int, int>> propertyTypeMap" . How could get this one? I mean it's strange that we are using int instead of string (since i don't know how to get int of my propertyname in my page).
Is there some kind of epi method that i could get Page property int value ??

Jan 31, 2019 12:58

You can use IPropertyDefinitionRepository to list all properties for a page type.

var pageTypeId = 10;
var propertyDefinitions = propertyDefinitionRepository.List(pageTypeId);
var property = propertyDefinitions.FirstOrDefault(x => x.Name == "NameOfProperty");
var propertyId = property.ID;
Edited, Jan 31, 2019 14:16
* 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.