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 CacheData
- type CcRel
- type RenderData
- type Standard
- func (a *Standard) ClearCache()
- func (a *Standard) Close()
- func (a *Standard) ContainsFunctionResult(c echo.Context, tmplOriginalName string, content string, ...) string
- func (a *Standard) ContainsSubTpl(c echo.Context, content string, subcs 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, subcs map[string]string, ...)
- func (a *Standard) ParseExtend(c echo.Context, content string, extcs 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) SetContentProcessor(fn func([]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 ¶
func NewTplInfo ¶
Types ¶
type CacheData ¶ added in v1.6.0
type CacheData struct {
// contains filtered or unexported fields
}
type CcRel ¶
type RenderData ¶
type RenderData struct { Func template.FuncMap Data interface{} Stored param.MapReadonly }
type Standard ¶
type Standard struct { CachedRelation *CacheData TemplateDir string TemplateMgr driver.Manager DelimLeft string DelimRight string IncludeTag string FunctionTag 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) ContainsFunctionResult ¶ added in v1.6.0
func (*Standard) ContainsSubTpl ¶
func (*Standard) InitRegexp ¶
func (a *Standard) InitRegexp()
func (*Standard) MonitorEvent ¶
func (*Standard) ParseBlock ¶
func (*Standard) ParseExtend ¶
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.