WebBasic CMS
References

include

insert external form

using the include statement in the template can insert content of external file, form, or other template.

Example:

<html> 
  <!-- it is /samples/wrapper.inc.php --> 
  <head data-wb-role="include" src="template" data-wb-name="head.inc.php"> 
  </head> 
  <body> 
  <div data-wb-role="include" src="/samples/header.inc.php"></div> 
<nav data-wb-role="include" src="template" data-wb-name="menu.inc.php"> 
  </nav> 
  <div id="content"> 
  <h2 class="header">{{header}}</h2> 
  <p>{{text}}</p> 
  </div> 
  <div data-wb-role="include" src="/samples/footer.inc.php"></div> 
  </body> 
</html> 

Example:

<meta data-wb-role="include" data-wb-src="/samples/wrapper.inc.php">
<div id="text" data-wb-append="#content" data-wb-hide="*">
   <ul>
      <li> 1 - include wrapper from previous example</li>
      <li> 2 - append content from div#text to div#content</li>
      <li> Great!!! </li>
   </ul>
</div>

Control attributes:

data-wb-role
the name of the include statement
data-wb-src
the path to the desired file or type the predefined insertion (modal, uploader, editor, source, gallery, seo, form, template, module)
data-wb-id
set  #id  to inserted element
data-wb-class
set  .class  to inserted element
data-wb-formsave
if the pasted element contains attribute data-wb-formsave, he is accept this value
data-wb-header
adds the header in the current context
data-wb-footer
adds the footer in the current context
data-wb-json
transferred any variables in JSON format to add to output