Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplateRoot = "pages"
Functions ¶
This section is empty.
Types ¶
type TemplateContext ¶
type TemplateContext struct { Vars *jet.VarMap Context *map[string]interface{} Template *jet.Template Module string Page string TemplName string }
模板引擎配置
func InitTemplateContext ¶
func InitTemplateContext(t *engine.TemplateEngine, c *gin.Context) *TemplateContext
初始化模板
func (*TemplateContext) FindTemplate ¶
func (ctx *TemplateContext) FindTemplate(t *engine.TemplateEngine) error
func (*TemplateContext) GetTemplateDir ¶ added in v1.0.2
func (ctx *TemplateContext) GetTemplateDir() string
func (*TemplateContext) Namespace ¶ added in v1.0.2
func (ctx *TemplateContext) Namespace() string
Click to show internal directories.
Click to hide internal directories.