arsd.webtemplate

This provides a kind of web template support, built on top of arsd.dom and arsd.script, in support of arsd.cgi.

<main>
	<%=HTML some_var_with_html %>
	<%= some_var %>

	<if-true cond="whatever">
		whatever == true
	</if-true>
	<or-else>
		whatever == false
	</or-else>

	<for-each over="some_array" as="item">
		<%= item %>
	</for-each>
	<or-else>
		there were no items.
	</or-else>

	<render-template file="partial.html" />
</main>

Functions available: encodeURIComponent, formatDate, dayOfWeek, formatTime

Public Imports

arsd.jsvar
public import arsd.jsvar : var;

Members

Structs

RenderTemplate
struct RenderTemplate

Can be used as a return value from one of your own methods when rendering websites with WebPresenterWithTemplateSupport.

Skeleton
struct Skeleton

UDA to put on a method when using WebPresenterWithTemplateSupport. Overrides the default template skeleton file name.

Template
struct Template

UDA to put on a method when using WebPresenterWithTemplateSupport. Overrides default generic element formatting and instead uses the specified template name to render the return value.

Templates

WebPresenterWithTemplateSupport
template WebPresenterWithTemplateSupport(CTRP)

Make a class that inherits from this with your further customizations, or minimally:

Suggestion Box / Bug Report