We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi @kjac
I have found that the GetFormModelProperty function does not consider the possibility of property being in a composition in the contentType.
So I have revised code in ContentHelper.cs below to fix - can give pull request if you want.
public static PropertyType GetFormModelProperty(IContentType contentType) { List<PropertyType> propertyTypes = contentType.PropertyTypes.ToList(); propertyTypes.AddRange(contentType.CompositionPropertyTypes); var property = propertyTypes.FirstOrDefault(p => p.PropertyEditorAlias == FormModel.PropertyEditorAlias); return property; }
Let me know if you need anything else and when you'll repackage - I'll run my custom built dll for now.
The text was updated successfully, but these errors were encountered:
Hi @joshreid,
Awesome, thank you!
Just to avoid creating the list if we don't have to, could you try this code and see if that works for you as well?
public static PropertyType GetFormModelProperty(IContentType contentType) { bool IsFormModelPropertyEditor(PropertyType p) => p.PropertyEditorAlias == FormModel.PropertyEditorAlias; return contentType.PropertyTypes.FirstOrDefault(IsFormModelPropertyEditor) ?? contentType.CompositionPropertyTypes.FirstOrDefault(IsFormModelPropertyEditor); }
Sorry, something went wrong.
All good thanks @kjac - yep that's better, and works as expected.
#172 - support compositions
b784395
Whoops, this one's in the latest version :) closing it now.
No branches or pull requests
Hi @kjac
I have found that the GetFormModelProperty function does not consider the possibility of property being in a composition in the contentType.
So I have revised code in ContentHelper.cs below to fix - can give pull request if you want.
Let me know if you need anything else and when you'll repackage - I'll run my custom built dll for now.
The text was updated successfully, but these errors were encountered: