mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
parent
3037d200cb
commit
43891e3994
1 changed files with 5 additions and 3 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue