You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: