Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Hi Hannes,
The way I would do this is to maybe extend or create a method that allows you to pass in IContent (page or block) and a property name.
Then you should be able to use content.Property["PropertyNameHere"];
This is a quick example plucked from Alloy
var startPage = _contentLoader.Get<StartPage>(SiteDefinition.Current.StartPage);
var property = startPage.Property["MainContentArea"];
Yes, that was the way I had to go. Getting the PropertyData only from the PropertyInfo object was impossible.
I want to see if a property is personalized or not in an override method of PropertyFor.
In this override method I get an expression, and from that and can extract the PropertyInfo object for the property.
How do I get the PropertyData from the PropertyInfo object?
When I have the PropertyData object I want to cast it to a IPersonalizedRoles so I can see if it is personalized.