Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(d *deps.Deps, t *internal.TemplateDeps) *internal.FuncsNamespace
Creates a new Namespace and returns a new internal.FuncsNamespace
Types ¶
type Namespace ¶
type Namespace struct {
// contains filtered or unexported fields
}
Namespace defines the methods for attributes to be used as template functions.
func New ¶
func New(d *deps.Deps, t *internal.TemplateDeps) *Namespace
Creates a new attributes Namespace
func (*Namespace) Body ¶
Body
Returns class names for the body element. Includes the resource, page ID, page title, page template, page layout and if the user is logged in or not.
Example: `{{ body }}` Returns: `page page-id-4 page-title page-template-news-archive page-layout-main logged-in` (for example)
Click to show internal directories.
Click to hide internal directories.