Chloe link and form tags
Furnace framework » Furnace presentation layer » Chloe templates » Standard Chloe tags

Prev:Control-flow Chloe tags


The following tags are only available if the furnace.chloe-tags vocabulary is loaded.
t:aRenders a link; extends the standard XHTML a tag by providing some integration with other web framework features. The following attributes are supported:
href - a URL. If it begins with $, then it is interpreted as a responder-relative path.
rest - a value to add at the end of the URL.
query - a comma-separated list of value names defined in the current form which are to be passed to the link as query parameters.
value - a value name holding a URL. If this attribute is specified, it overrides all others.

Any attributes not in the Chloe XML namespace are passed on to the generated a tag.

An example:
<t:a t:href="$wiki/view/" t:rest="title" class="small-link"> View </t:a>

The above might render as
<a href="http://mysite.org/wiki/view/Factor" class="small-link"> View </a>
t:baseOutputs an HTML <base> tag. The attributes are interpreted in the same manner as the attributes of t:a.
t:formRenders a form; extends the standard XHTML form tag by providing some integration with other web framework features, for example by adding hidden fields for authentication credentials and session management allowing those features to work with form submission transparently. The following attributes are supported:
t:method - just like the method attribute of an HTML form tag, this can equal get or post. Unlike the HTML tag, the default is post.
t:action - a URL. If it begins with $, then it is interpreted as a responder-relative path.
t:for - a comma-separated list of form values which are to be inserted in the form as hidden fields. Other than being more concise, this is equivalent to nesting a series of t:hidden tags inside the form.

Any attributes not in the Chloe XML namespace are passed on to the generated form tag.
t:buttonShorthand for a form with a single button, whose label is the text child of the t:button tag. Attributes are processed as with the t:form tag, with the exception that any attributes not in the Chloe XML namespace are passed on to the generated button tag, rather than the form tag surrounding it.

An example:
<t:button t:method="POST" t:action="$wiki/delete" t:for="id" class="link-button"> Delete </t:button>
t:validation-errorsRenders validation errors in the current form which are not associated with any field. Such errors are reported by invoking validation-error.