Albatross's templating engine supports a number of special html tags which interact with the application framework. XXX Explain order in which namespaces which are searched when resolving variables in{{{ctx.locals}}}. Looks in (XXX incomplete and unordered): * ctx.locals * as a module in the the global namespace of the execution context importing the module in the same module which creates the execution context. Application tags are the interface between the generation of HTML and the application. When tags aren't recognised they are just emitted as-is, no error logging is performed. This could be considered a bug but it simplifies the parsing and allows for new tags to be introduced without interfering with existing apps. * Application tags * XXX don't forget the options * XXX Adds the path to the returned URL. * * Each of the al-input types has the same style, each reading and setting a named value in ctx.locals. Here's an example: if check1 isn't already set in your context, your {{{page_setup}}} method can initialise it using: {{{#!python ctx.locals.check1 = 1 }}} Invoke the html in your html view: {{{ }}} When the page comes back from the server, you can inspect the value in {{{page_process}}} using: {{{#!python if ctx.local.check1: selected() else: unselected() }}} Text field: {{{ }}} Singleton checkbox: {{{ }}} Checkbox group: {{{ }}} Radio buttons: {{{ }}} Option menu: XXX describe how to set up an option list {{{ }}} Input button {{{ }}} XXX example here of how to take different action based on save/cancel buttons * / * / Al-lookup does a simple table lookup of a value and is replaced with the matching result or nothing if no value is matched. The following is a table which translates the internal program value into HTML for display. {{{ Trivial Minor Normal Major Critical }}} We invoke the lookup table by using the lookup attribute of the tag. {{{ Severity: }}} Note that the btsvalues module does not need to be in the namespace at this point. * Flow control * * / * * * Substitution * * /