layout

package
v1.0.27 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Layout added in v1.0.26

type Layout struct {
	BaseTemplate string
	Tmpl         *template.Template
}

func New

func New(name string, tmpl *template.Template) *Layout

func (*Layout) Render added in v1.0.26

func (l *Layout) Render(c *gin.Context, params *LayoutParams)

type LayoutParams

type LayoutParams struct {
	Header       map[string]interface{}
	Data         map[string]interface{}
	Footer       map[string]interface{}
	TemplateName string
	Layout       *Layout
}

func (*LayoutParams) RenderPage added in v1.0.26

func (p *LayoutParams) RenderPage() template.HTML

Jump to

Keyboard shortcuts

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