template

package
v1.8.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 12, 2024 License: MIT Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL