Get Template properties from parent
I want to implement functionality to allow editors to set webpage template properties to inherit from the parent page. I do not see any way to access template properties from another page, or a way to access the ContentItemCommonDataVisualBuilderTemplateConfiguration field in the ContentItemCommonData
Environment
- Xperience by Kentico version: [30.3.1]
- .NET version: [8]
- Execution environment: [local]
- Link to relevant Xperience by Kentico documentation
Answers
I looked through the Migration.Tool code and found where it was referenced.
var parentCommonDataInfo = await ContentItemCommonDataInfo.Provider.GetAsync(parentPage.SystemFields.WebPageItemID);
parentCommonDataInfo.ContentItemCommonDataVisualBuilderTemplateConfiguration
There you go!
Also...and this may be bad advice, but if you're doing some unusual, and the API doesn't exist, don't forget you can always carefully just SQL it (use new DataQuery() { CustomQueryText = MyQuery }.GetDataContainerResultAsync()
)
To answer this question, you have to login first.