Convenience functions for templates. These are automatically imported into the @racket[eval] environment when rendering with a template (see @racket[render]).
Convert @racket[_xexpr] to an HTML string. Similar to @racket[xexpr->string], but consistent with the HTML spec, text that appears within @code{script} or @code{style} blocks will not be escaped.
The optional keyword arguments @racket[_html-tag] and @racket[_html-attrs] let you set the outer tag and attributes for the generated HTML. If @racket[_xexpr] already has an outer tag or attributes, they will be replaced.
Be careful not to pass existing HTML strings into this function, because the angle brackets will be escaped. Fine if that's what you want, but you probably don't.
Find matches for @racket[_key] in @racket[_value-source]. The @racket[_value-source] can be 1)a hashtable of @racket[metas], 2)a tagged X-expression representing a @racket[doc], or 3)a pagenode or path that identifies a source file that provides @racket[metas] and @racket[doc]. In that case, first look for @racket[_key] in @code{metas} (using @racket[select-from-metas]) and then in @code{doc} (using @racket[select-from-doc]).
With @racket[select], you get the first result; with @racket[select*], you get them all.
In both cases, you get @racket[#f] if there are no matches.
Look up the value of @racket[_key] in @racket[_meta-source]. The @racket[_meta-source] argument can be either 1)a hashtable representing @racket[metas] or 2)a pagenode or source path that identifies a source file that provides @racket[metas]. If no value exists for @racket[_key], you get @racket[#f].
Look up the value of @racket[_key] in @racket[_doc-source]. The @racket[_doc-source] argument can be either 1)a tagged X-expression representing a @racket[doc] or 2)a pagenode or source path that identifies a source file that provides @racket[doc]. If no value exists for @racket[_key], you get @racket[#f].
Convenience function for templates that's simpler to use than plain @racket[when]. If @racket[_condition] is true, then put the @racket[_text-to-insert] into the template at the current location. Within a template file, usually invoked like so:
@verbatim{◊when/block[@racketvarfont{condition}]{The text to insert.}}
The inserted text can contain its own nested Pollen commands.