Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Engine = &TemplateEngine{}
View Source
var TemplateCache = xcore.NewXCache("template", 0, 3600*time.Second)
Functions ¶
This section is empty.
Types ¶
type TemplateEngine ¶
type TemplateEngine struct{}
func (*TemplateEngine) GetInstance ¶
func (re *TemplateEngine) GetInstance(Hostname string, PagesDir string, P string, i identity.Identity) assets.EngineInstance
func (*TemplateEngine) NeedInstance ¶
func (re *TemplateEngine) NeedInstance() bool
func (*TemplateEngine) Run ¶
func (se *TemplateEngine) Run(ctx *context.Context, s interface{}) interface{}
type TemplateEngineInstance ¶
type TemplateEngineInstance struct {
FilePath string
}
func (*TemplateEngineInstance) NeedLanguage ¶
func (p *TemplateEngineInstance) NeedLanguage() bool
func (*TemplateEngineInstance) NeedTemplate ¶
func (p *TemplateEngineInstance) NeedTemplate() bool
func (*TemplateEngineInstance) Run ¶
func (p *TemplateEngineInstance) Run(ctx *context.Context, template *xcore.XTemplate, language *xcore.XLanguage, e interface{}) interface{}
context contains all the page context and history params are an array of strings (if page from outside) or a mapped array of data (inner pages) template may be modified, we need to CLONE it
Click to show internal directories.
Click to hide internal directories.