November Happy Hour will be moved to Thursday December 5th.
AI OnAI Off
November Happy Hour will be moved to Thursday December 5th.
There's no reason to do this for pages. The "issue" is block controllers, which are only needed if you need to construct a view model. I.e. if your view for the block only needs the data from the BlockData instance, then there's no need for the block controller. Sometimes you need to controll which view should be used, e.g. different view per display tag, that can be achieved with a block controller as well, but then there's a better way: IViewTemplateModelRegistrator. See How To Make A Block Use Multiple Views ? A Partial View Controller Explained - Jon D Jones (jondjones.com).
Hi,
I've tried to follow this code to implement Controllerless EPiServer.
https://swapcode.wordpress.com/2018/05/16/episerver-block-performance-with-controller-vs-without-controller-vs-irendertemplate/
In short:
When implementing this abstraction:
I have tried a lot of options for the "TemplateDescriptor" attribute, but nothing seems to work.
With Tags, without Tags, with TemplateTypeCategory, with typeof(StartPage) as model type etc etc.
Have I missed anything?