-
Notifications
You must be signed in to change notification settings - Fork 119
Description
Hello,
We have a shared partial view that does @Html.Glass().Editable(x => x.Title).
The Title property on the view's vm gets set from different fields for different Sitecore data templates.
For example, for a news component the Title is set with Title, but for a product component with ProductName.
Because the ID on the partial view's vm points to the correct Sitecore item, Glass can find the item to be edited.
But Glass can -of course- only find the correct field to be edited on the news item, NOT on the product item.
Is there a smart way to make the generic view update data template specific fields?
For example, have a property on the vm with the field name, so that the view can edit x -> x.ReferencedField?
Or is there another way this can / should be accomplished?
Thanks in advance!
Jeroen