Differences between revisions 1 and 2
Revision 1 as of 2006-08-11 11:43:42
Size: 364
Editor: ppp1DA0
Comment:
Revision 2 as of 2006-08-11 12:26:01
Size: 1598
Editor: BenGolding
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:
  * <al-lookup>/<al-item>
    The following is a table which translates the internal program value into HTML for display.
    {{{
<al-lookup name="bug-severity">
 <al-item expr="btsvalues.TRIVIAL"><font color="green">Trivial</font></al-item>
 <al-item expr="btsvalues.MINOR">Minor</al-item>
 <al-item expr="btsvalues.NORMAL">Normal</al-item>
 <al-item expr="btsvalues.MAJOR"><font color="red">Major</font></al-item>
 <al-item expr="btsvalues.CRITICAL"><font color="red"><b>Critical</b></font></al-item>
</al-lookup>
}}}
    The btsvalues module must be visible when the <al-lookup> tag is executed. You can place the btsvalues module in the the global namespace of the execution context by importing the btsvalues module in the same module which creates the SimpleContext execution context. When using other Albatross execution contexts you would need to import btsvalues in the module which called run_template() or run_template_once() to execute the <al-lookup> tag.

    We invoke the lookup table by using the lookup attribute of the <al-value> tag.
    {{{
Severity: <al-value expr="bug.severity" lookup="bug-severity">
}}}
    Note that the btsvalues module does not need to be in the namespace at this point.

Albatross's templating engine supports a number of special html tags which interact with the application framework.

  • Application tags
    • <al-value>

    • <al-a>

    • <al-form>

    • <al-input>

    • <al-select>/<al-option>

    • <al-lookup>/<al-item>

      • The following is a table which translates the internal program value into HTML for display.
        <al-lookup name="bug-severity">
         <al-item expr="btsvalues.TRIVIAL"><font color="green">Trivial</font></al-item>
         <al-item expr="btsvalues.MINOR">Minor</al-item>
         <al-item expr="btsvalues.NORMAL">Normal</al-item>
         <al-item expr="btsvalues.MAJOR"><font color="red">Major</font></al-item>
         <al-item expr="btsvalues.CRITICAL"><font color="red"><b>Critical</b></font></al-item>
        </al-lookup>

        The btsvalues module must be visible when the <al-lookup> tag is executed. You can place the btsvalues module in the the global namespace of the execution context by importing the btsvalues module in the same module which creates the SimpleContext execution context. When using other Albatross execution contexts you would need to import btsvalues in the module which called run_template() or run_template_once() to execute the <al-lookup> tag.

        We invoke the lookup table by using the lookup attribute of the <al-value> tag.

        Severity: <al-value expr="bug.severity" lookup="bug-severity">
        Note that the btsvalues module does not need to be in the namespace at this point.
  • Flow control
    • <al-for>

    • <al-if>/<al-else>

    • <al-exec>

  • Substitution
    • <al-include>

    • <al-macro>/<al-expand>

None: Tags (last edited 2011-02-15 06:05:18 by localhost)