pagoda: github.com/lennykean/pagoda Index | Files

package pagoda

import "github.com/lennykean/pagoda"

Index

Package Files

layouttemplatemanager.go templatemanager.go

type LayoutTemplateManager Uses

type LayoutTemplateManager struct {
    *TemplateManager
    // contains filtered or unexported fields
}

LayoutTemplateManager loads and executes templates with a layout page

func (*LayoutTemplateManager) Execute Uses

func (layoutTemplateManager *LayoutTemplateManager) Execute(templateName string, writer io.Writer, data interface{}) (err error)

Execute a template named templateName

func (*LayoutTemplateManager) GetTemplate Uses

func (layoutTemplateManager *LayoutTemplateManager) GetTemplate(templateName string) (tpl *template.Template, err error)

GetTemplate gets a template from the templateFolder based on the templateName

type TemplateManager Uses

type TemplateManager struct {
    // contains filtered or unexported fields
}

TemplateManager automatically loads, retrieves and executes templates

func NewTemplateManager Uses

func NewTemplateManager(templateFolder string) (templateManager *TemplateManager, err error)

NewTemplateManager creates a new TemplateManager based on templateFolder

func (*TemplateManager) Close Uses

func (templateManager *TemplateManager) Close() error

Close cleans up resources

func (*TemplateManager) Execute Uses

func (templateManager *TemplateManager) Execute(templateName string, writer io.Writer, data interface{}) (err error)

Execute a template named templateName

func (*TemplateManager) Funcs Uses

func (templateManager *TemplateManager) Funcs(funcs template.FuncMap)

Funcs adds template functions

func (*TemplateManager) GetTemplate Uses

func (templateManager *TemplateManager) GetTemplate(templateName string) (tpl *template.Template, err error)

GetTemplate gets a template from the templateFolder based on the templateName

func (*TemplateManager) UseLayoutTemplate Uses

func (templateManager *TemplateManager) UseLayoutTemplate(layoutTemplateName string) *LayoutTemplateManager

UseLayoutTemplate allows templates to be wrapped with a layout template

Package pagoda imports 7 packages (graph). Updated 2016-07-17. Refresh now. Tools for package owners. This is an inactive package (no imports and no commits in at least two years).