模板

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

最新文章

  1. awk 双引号vs单引号
  2. svn客户端命令
  3. [c++] Pieces of knowledge
  4. STL之map应用 +hash表(51nod 1095)
  5. 键盘事件keydown、keypress、keyup随笔整理总结(摘抄)
  6. Nginx+Keepalived实现 转载
  7. eval()函数用法详解
  8. gephi安装好了,为何打不开?
  9. lua curl动态链接库编译安装
  10. Egret 事件机制
  11. hdu 4902 Nice boat 线段树
  12. C++&&Mysql&&codeblocks
  13. USB OTG简要
  14. clearfix:after 清除css浮动
  15. qrc资源文件加载后,裸机环境下图片不显示
  16. JAVA 程序编译过程;编辑器,编译器和解释器
  17. 微信里面防止下拉"露底"组件
  18. ubuntu16.04编译安装imu_tk
  19. 利用gcc自带的功能-fstack-protector检测栈溢出及其实现【转】
  20. Struts2进阶学习4

热门文章

  1. jenkins用户权限配置 Role-based Authorization Strategy
  2. USB闪存驱动器未显示在MacOS的Finder或磁盘工具上?为什么Mac无法识别USB该如何解决?
  3. super().__init__()方法
  4. Codeforces Round #622 (Div. 2).C2 - Skyscrapers (hard version)
  5. 带你快速了解Linux文件系统
  6. musql 单表查询
  7. 数据库之十一:CASE表达式
  8. jsonp 完成跨域请求注意事项
  9. windows批量删除同名进程
  10. wa自动机 的 莫队 刷题记录