I am trying to implement a detail view following this documentation.
My controller has this:
ActionResult Details(DynamicContent physician)
My view has this:
and it fails with this error: The model item passed into the dictionary is of type 'Telerik.Sitefinity.DynamicTypes.Model.Physicians.Physician', but this dictionary requires a model item of type 'Telerik.Sitefinity.Frontend.Mvc.Models.ContentDetailsViewModel'.
Yet if I were to look at the auto-generated template for Physicians Sitefinity is using Telerik.Sitefinity.Frontend.Mvc.Models.ContentDetailsViewModel as the model type.
I looked around at samples and widgets for feather and can see where the News widget for feather initializes its own viewmodel first with CreateDetailsViewModel(newsItem), but that does not seem to be a method I can use. Do I need to roll my own method to cast a viewmodel I want to use when dealing with feather?
Edit: For now I went ahead and added a CreatePhysicianViewModel method to my service layer and am setting everything I need and it seems to be working, but still wouldn't mind an official answer of sorts on whether I should have been able to use it the other way.