首页 > 其他 > 详细

beego 页面布局

时间:2020-01-10 17:35:54      阅读:133      评论:0      收藏:0      [点我收藏+]

模板

this.Layout = "admin/layout.html"
this.TplName = "admin/list.html"

在layout.html中必须有一下代码,才能显示list.html

{{.Layout.Content}}

LayoutSection

this.Layout = "layout.html"
this.LayoutSections = make(map[string]string)
this.LayoutSections["contentHead"] = "head.html"
this.TplName = "content.html"
LayoutSections
在layout.html插入{{.contentHead}} 代替head.html

beego 页面布局

原文:https://www.cnblogs.com/Mishell/p/12176923.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!