templateManager

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LAYOUT_BODY_TAG          = "{{ @RenderBody() }}"
	LAYOUT_TEMPLATE_DIRNAME  = "Shared"  //layout模板的文件在views目录下的文件夹名称,区分大小写
	LAYOUT_TEMPLATE_FILENAME = "_Layout" //layout模板的文件名路径,区分大小写,后缀有suffix确定
)

Variables

View Source
var LAYOUT_DATA string //layout文件的内容
View Source
var (
	LAYOUT_TEMPLATE_FILE string //layout模板的文件 路径,区分大小写.文件后缀必须小写。 views/Shared/_Layout.html
)
View Source
var PthSep string //文件路径分隔符
View Source
var TMPLATE_DIR string //模板存放目录,默认运行目录下的views , 不包含末尾斜杠

Functions

func Initialize

func Initialize()

Initialize the templates. args

func Render

func Render(ctlName, actName string, ViewData map[string]interface{}) ([]byte, error)

Render execute the template. if template not found , renturn nil,error

Types

This section is empty.

Jump to

Keyboard shortcuts

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