Is there a possibility to include a partial based on its existence or not?
I am willing to use this to “implement” a template inheritance mechanism with the standard Go template language.
The second question is whether it is possible to get information about the partial itself when included? What I am typically interested in is its filename at generation time.
Note: To scope things I am currently not interested in the other template engines as I want to have a syntax that is close to html design tools, can work with.
I wrote that part before I started to experiment with the idea.
But now being able to work around this way, helps me to stay with Hugo as generator. Especially for more complex templates I like to have most of the layout in one file and I also dislike to repeat header/footer includes for different types of bodies. Potentially I should also be able to follow a similar approach with the {{ render }} command, but I think I will end up with same kinds of tricks to deal with default content when a block is not overridden.