Documentation ¶
Overview ¶
*
- 模板扩展
- @author swh <swh@admpub.com>
Index ¶
- Variables
- func New(templateDir string, args ...logger.Logger) driver.Driver
- type CacheData
- type Standard
- func (a *Standard) ClearCache()
- func (a *Standard) Close()
- func (a *Standard) ContainsSnippetResult(c echo.Context, tmplOriginalName string, content string, ...) string
- func (a *Standard) ContainsSubTpl(c echo.Context, content string, includes map[string]string) string
- func (a *Standard) Debug() bool
- func (a *Standard) Fetch(tmplName string, data interface{}, c echo.Context) string
- func (a *Standard) Init()
- func (a *Standard) InitRegexp()
- func (a *Standard) Logger() logger.Logger
- func (a *Standard) Manager() driver.Manager
- func (a *Standard) MonitorEvent(fn func(string))
- func (a *Standard) ParseBlock(c echo.Context, content string, includes map[string]string, ...)
- func (a *Standard) ParseExtend(c echo.Context, content string, blocks map[string]string, passObject string, ...) (string, [][]string)
- func (a *Standard) RawContent(tmpl string) (b []byte, e error)
- func (a *Standard) Render(w io.Writer, tmplName string, values interface{}, c echo.Context) error
- func (a *Standard) RenderBy(w io.Writer, tmplName string, tmplContent func(string) ([]byte, error), ...) error
- func (a *Standard) SetContentProcessor(fn func(tmpl string, content []byte) []byte)
- func (a *Standard) SetDebug(on bool)
- func (a *Standard) SetFuncMap(fn func() map[string]interface{})
- func (a *Standard) SetLogger(l logger.Logger)
- func (a *Standard) SetManager(mgr driver.Manager)
- func (a *Standard) SetTmplPathFixer(fn func(echo.Context, string) string)
- func (a *Standard) Tag(content string) string
- func (a *Standard) TmplDir() string
- func (a *Standard) TmplPath(c echo.Context, p string) string
Constants ¶
This section is empty.
Variables ¶
View Source
var Debug = false
Functions ¶
Types ¶
type CacheData ¶ added in v1.6.0
type CacheData struct {
// contains filtered or unexported fields
}
type Standard ¶
type Standard struct { TemplateDir string TemplateMgr driver.Manager DelimLeft string DelimRight string IncludeTag string SnippetTag string ExtendTag string BlockTag string SuperTag string StripTag string Ext string // contains filtered or unexported fields }
func (*Standard) ClearCache ¶
func (a *Standard) ClearCache()
func (*Standard) ContainsSnippetResult ¶ added in v1.9.0
func (*Standard) ContainsSubTpl ¶
func (*Standard) InitRegexp ¶
func (a *Standard) InitRegexp()
func (*Standard) MonitorEvent ¶
func (*Standard) ParseBlock ¶
func (*Standard) ParseExtend ¶
func (*Standard) RenderBy ¶ added in v1.6.0
func (a *Standard) RenderBy(w io.Writer, tmplName string, tmplContent func(string) ([]byte, error), values interface{}, c echo.Context) error
RenderBy render by content
func (*Standard) SetContentProcessor ¶
func (*Standard) SetFuncMap ¶ added in v1.1.0
func (*Standard) SetManager ¶ added in v1.1.0
func (*Standard) SetTmplPathFixer ¶ added in v1.4.3
Click to show internal directories.
Click to hide internal directories.