mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 04:51:30 +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)
|
BeeTemplates[subdir].ExecuteTemplate(newbytes, file, c.Data)
|
||||||
tplcontent, _ := ioutil.ReadAll(newbytes)
|
tplcontent, _ := ioutil.ReadAll(newbytes)
|
||||||
c.Data["LayoutContent"] = template.HTML(string(tplcontent))
|
c.Data["LayoutContent"] = template.HTML(string(tplcontent))
|
||||||
|
subdir = path.Dir(c.Layout)
|
||||||
_, file = path.Split(c.Layout)
|
_, file = path.Split(c.Layout)
|
||||||
ibytes := bytes.NewBufferString("")
|
ibytes := bytes.NewBufferString("")
|
||||||
err := BeeTemplates[subdir].ExecuteTemplate(ibytes, file, c.Data)
|
err := BeeTemplates[subdir].ExecuteTemplate(ibytes, file, c.Data)
|
||||||
|
Loading…
Reference in New Issue
Block a user