mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 21:40:50 +00:00
fix layout
This commit is contained in:
parent
6af2778ab9
commit
d4610a9313
@ -160,6 +160,7 @@ func (c *Controller) RenderBytes() ([]byte, error) {
|
||||
BeeTemplates[subdir].ExecuteTemplate(newbytes, file, c.Data)
|
||||
tplcontent, _ := ioutil.ReadAll(newbytes)
|
||||
c.Data["LayoutContent"] = template.HTML(string(tplcontent))
|
||||
subdir = path.Dir(c.Layout)
|
||||
_, file = path.Split(c.Layout)
|
||||
ibytes := bytes.NewBufferString("")
|
||||
err := BeeTemplates[subdir].ExecuteTemplate(ibytes, file, c.Data)
|
||||
|
Loading…
Reference in New Issue
Block a user