Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Helpers = map[string]interface{}{ "js_escape": template.JSEscapeString, "html_escape": template.HTMLEscapeString, "json": ToJSON, "content_for": ContentFor, "content_of": ContentOf, "upcase": strings.ToUpper, "downcase": strings.ToLower, }
Helpers that are automatically injected into templates.
yield - renders the content of a template into a layout. partial - renders the content of a partial into a template. js_escape - escapes a string to be valid in JavaScript. html_escape - escapes any HTML characters in a string. json - converts the interface to JSON. content_for - stores a block of templating code to be re-used later in the template. content_of - retrieves a stored block for templating and renders it. upcase - strings.ToUpper. downcase - strings.ToLower.
Functions ¶
func ContentFor ¶
ContentFor stores a block of templating code to be re-used later in the template.
{{content_for "buttons"}} <button>hi</button> {{/content_for}}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.