Templates

<< Click to Display Table of Contents >>

Navigation:  »No topics above this level«

Templates

Frame is rendered using templates. Templates are stored in web/templates.txt file with the following structure

 

#template-name1
  template line1
  template line2
  template line3
 
#template-name2
  template line1
  template line2
  template line3

 

Each template starts with line containing # symbol at first position following with template name. Subsequent lines (until next template name) are treated as template body.

 

Example of template:

 

#vpanels
  <div id="{{id}}" class="component panel {{class}}" style="display:flex;width:100%;height:100%;{{style}}" >
    <div class="v-panels-left h-resize" style="width:{{left.width}};min-width:{{left.minwidth}}" id="{{left.id}}">
      {{{content.left}}} 
    </div>
    <div class="v-panels-right" style="flex-grow:1;overflow:hidden" id="{{right.id}}">
      {{{content.right}}} 
    </div>
  </div>
 

 

Server can reload changed templates without restarting. To enable this call Server.CheckTemplatesModified from a timer or separate thread.