Both together
A page without a template of its own gets the closest template or code default. Two rules settle ties:
- A template wins over a code default that is just as close. Editors can take over a type by making a template for it, with no change to the code.
- A template made for no types comes last, after every code default. It is the layout for whatever nothing else covers.
IPage ◄── IArticle ◄── INews code: RenderRazorView<IArticle>() for IArticle
templates: "news" for INews
"fallback" for no type
an INews → template "news" the closest
an IArticle → RenderRazorView the only one for IArticle itself
an IProduct → template "fallback" nothing closer; a template for no type is last
(with RenderRazorView<IPage>("Default") added: "Default")