I've built a rudimentary layout based site in golang with beego, I've split my page layout into a file called views/_layout.tpl and referenced it as below from a controller.
func (c *BuyerController) Get() {
...
c.Layout = "_layout.tpl"
c.TplName = "buyers.tpl"
}
The layout has in the middle of it the required line:
{{.LayoutContent}}
The strange thing is that when I run the web server with IDEA/IntelliJ it renders just fine in the browser, but when I run it from the console with bee run all the html from the layout file is missing and just the contents of buyers.tpl is shown.
I've run each build of the compiled app and it the same happens, the one built by IntelliJ works, and the one built by bee run doesn't.
As far as I can see I've followed http://beego.me/docs/mvc/view/view.md#layout-design
Any ideas what I've done wrong, or any clues how to figure it out? Thanks.