Page template renders without layout template
Closed this issue · 1 comments
I've been trying to figure this out on my own for a week and I now officially give up; I need help.
Between https://doc.getqor.com/guides/render.html and the qor-example, I got view/render set up but instead of serving up my home page properly, it renders the home page template without the layout template.
No error messages at all.
What I tried:
Now, if I rename application.tmpl and try again, I do get a console message saying "Failed to render layout: 'layouts/application.tmpl, got error: layouts/application.tmpl not found". That's what I expect.
I concluded that it is at least trying to load the layout template and something prevents it from doing that (but then why does it render the page template?).
Next I renamed application.tmpl to application.tmpl.bak and created a fresh application.tmpl (in case there was something wrong with my current application.tmpl) and populated it with the minimal example from https://doc.getqor.com/guides/render.html :
<!-- app/views/layout/application.tmpl -->
<html>
<head>
</head>
<body>
{{yield}}
</body>
</html>
[ignoring the fact that html comment line above has the wrong directory: 'layout' should be 'layouts']
Same result: renders page template without layout template and no error messages.
Is there some way I can get more diagnostic output from the render process?
Why does it not render with even the simple layout template above?
Prior to first testing of my application I upgraded go and it is now at:
go version go1.10.1 linux/amd64
.
Could the upgraded go installation be a problem?
NEVERMIND: I forgot to make a change to the simple template in my last post so I could tell the template was loading (because the browser will wrap the html fragment inside of proper tags itself) -- yes, the minimal layout template IS loading and being used, so I guess I have an issue with my original template.
I would still like to see some kind of debug message when Render finds the layout template but doesn't render it for some reason. Closing ticket.