Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var InCtx = Middleware
InCtx puts the render engine in the context so the handlers can use it, it also sets a few other values that are useful for the handlers.
Functions ¶
Types ¶
type Option ¶
type Option func(*Engine)
func WithDefaultLayout ¶
WithDefaultLayout sets the default layout for the engine if no layout is specified in the template this layout will be used. By default this is set to "app/layouts/application.html"
func WithHelpers ¶
WithHelpers sets the helpers for the engine these helpers will be available in all templates rendered by this engine.
type Page ¶
type Page struct {
// contains filtered or unexported fields
}
func FromCtx ¶
FromCtx returns the render engine from the context when its called it also adds any value in the valuer into the page, this is useful for the middlewares such as session to add values to the page.
func (*Page) RenderClean ¶
func (*Page) RenderWithLayout ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.