1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 12:50:55 +00:00

fix layout

This commit is contained in:
astaxie 2013-05-07 15:42:57 +08:00
parent 6af2778ab9
commit d4610a9313

View File

@ -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)