Always use the template provided in page.Render

Fixes #1306
This commit is contained in:
Bjørn Erik Pedersen 2015-07-29 01:19:29 +02:00
parent 3037d200cb
commit 43891e3994

View file

@ -704,13 +704,15 @@ func (p *Page) Menus() PageMenus {
}
func (p *Page) Render(layout ...string) template.HTML {
curLayout := ""
var l []string
if len(layout) > 0 {
curLayout = layout[0]
l = layouts(p.Type(), layout[0])
} else {
l = p.Layout()
}
return tpl.ExecuteTemplateToHTML(p, p.Layout(curLayout)...)
return tpl.ExecuteTemplateToHTML(p, l...)
}
func (p *Page) guessMarkupType() string {