Documentation ¶
Overview ¶
*
- 模板扩展
- @author swh <swh@admpub.com>
Index ¶
- Variables
- func New(templateDir string, args ...logger.Logger) driver.Driver
- func NewTplInfo(t *htmlTpl.Template) *tplInfo
- type CcRel
- type Standard
- func (self *Standard) ClearCache()
- func (self *Standard) Close()
- func (self *Standard) ContainsSubTpl(content string, subcs map[string]string) string
- func (self *Standard) Debug() bool
- func (self *Standard) Fetch(tmplName string, data interface{}, funcMap map[string]interface{}) string
- func (self *Standard) Init(cached ...bool)
- func (self *Standard) InitRegexp()
- func (self *Standard) Logger() logger.Logger
- func (self *Standard) MonitorEvent(fn func(string))
- func (self *Standard) ParseBlock(content string, subcs map[string]string, extcs map[string]string)
- func (self *Standard) ParseExtend(content string, extcs map[string]string, passObject string, ...) (string, [][]string)
- func (self *Standard) RawContent(tmpl string) (b []byte, e error)
- func (self *Standard) Render(w io.Writer, tmplName string, values interface{}, c echo.Context) error
- func (self *Standard) SetContentProcessor(fn func([]byte) []byte)
- func (self *Standard) SetDebug(on bool)
- func (self *Standard) SetFuncMap(fn func() map[string]interface{})
- func (self *Standard) SetLogger(l logger.Logger)
- func (self *Standard) SetManager(mgr driver.Manager)
- func (self *Standard) Tag(content string) string
- func (self *Standard) TemplatePath(p string) string
- func (self *Standard) TmplDir() string
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
Functions ¶
func NewTplInfo ¶
Types ¶
type Standard ¶
type Standard struct { CachedRelation map[string]*CcRel TemplateDir string TemplateMgr driver.Manager DelimLeft string DelimRight string IncludeTag string ExtendTag string BlockTag string SuperTag string Ext string TemplatePathParser func(string) string // contains filtered or unexported fields }
func (*Standard) ClearCache ¶
func (self *Standard) ClearCache()
func (*Standard) ContainsSubTpl ¶
func (*Standard) InitRegexp ¶
func (self *Standard) InitRegexp()
func (*Standard) MonitorEvent ¶
func (*Standard) ParseBlock ¶
func (*Standard) ParseExtend ¶
func (*Standard) Render ¶
func (self *Standard) Render(w io.Writer, tmplName string, values interface{}, c echo.Context) error
Render HTML
func (*Standard) SetContentProcessor ¶
func (*Standard) SetFuncMap ¶ added in v1.1.0
func (*Standard) SetManager ¶ added in v1.1.0
func (*Standard) TemplatePath ¶
Click to show internal directories.
Click to hide internal directories.