WebBasic CMS
References

Templates

Templates in Web Basic a single file in HTML format. To perform various actions (loops, conditions, inserting data, etc.) is used special instructions in the tag attributes. Thus, the HTML structure does not break third-party code.

To insert database fields, use double curly brackets. It also supports multiple fields.

Example

<html> 
    <head data-wb-role="include" data-wb-src="/tpl/head.inc.php"> 
    </head> 
    <body> 
       <nav data-wb-role="include" src="/tpl/menu.inc.php"> 
       </nav> 
       <section>
         <h1>{{header}}</h1>
         <p>{{text}}</p>
         <div data-wb-role="foreach" data-wb-from="peoples" data-wb-where='phone > ""'>
              <p>{{firstname}} {{lastname}} - {{phone}}</p>
         </div>
         <p>
            <h4>Phones:</h4>
            <ul>
               <li>{{phone[work]}}</li>
               <li>{{phone[home]}}</li>
            </ul>
         </p>
       </section> 
  </body> 
</html>

Learn More about Web Basic instructions.