I've tried to follow this code to implement Controllerless EPiServer.
public abstract class ViewRenderTemplate<T> : IView, IRenderTemplate<T> where T : class, IContentData ...
When implementing this abstraction:
[TemplateDescriptor(Default = true, AvailableWithoutTag = false)]
public class StartPageViewRender : ViewRenderTemplate<StartPage>
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?
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).