Assign details view dynamically
Hi,
I am evaluating sitefinity and wanted to know if I could assign different details view dynamically based on some business criterion on the master list view?
Thanks,
Sharath
Hi,
This is not impossible, but would be very difficult to achieve. There is a property in the ContentView, called DetailViewName (there is also a MasterViewName), which can be dynamically changed, but this wouldn't be enough, as the property is persisted in the configurations and the logic that determines which view to load reads the persisted value. So, you will also have to change the logic that loads the different views (Master and detail). However, here comes the problem that the method DetermineCurrentViewName of ContentView is defined as "protected internal virtual" which means that the whole ContentView class would have to be rewritten.
Regards,