Why .Render fails when file extension is added?

I added a layout using .Render and adding the file extension .html threw an error. Why does this happen? (I am aware partial works with or without extension)

.Render takes a layout/view name, which is not the same as a filename. It fails because we cannot find a template given the layout/view name in combo with the output format’s name/extension, language etc.

The partials are directly connected to a filename, that it works without an extension is only to keep it backwards compatible.

Makes sense now!

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.