PDA

View Full Version : Working with ExtJs html templates



savsw
14 Sep 2010, 4:08 AM
Hello,

Where can I get list of allowed commands?
I've got an example:


<div>
<div class="ENT-general ENT-contactNumber">{primaryExtension}</div>
<tpl if="queueStatus == 'online'">
<div style="background-image: url({queue_status_url});" class="ENT-general"></div>
</tpl>
<tpl if="queueStatus != 'online'">
<div style="background-image: url({queue_status_url});" class="ENT-general"></div>
</tpl>
</div>


Can I use "else if" and "else" commands? If I can, please give an example of syntax.

Thank you.

Condor
14 Sep 2010, 5:27 AM
No, there is no 'else'. You will have to do another 'if' with a negated condition.

The only <tpl> actions are:
- for (loop over an array)
- if (conditional include)
- exec (execute javascript)