Template Loading

The rex template compiler engine is an in-built template engine that is used for compiling rex template files. The template files uses special predefined helper template directives to make it easier to build web pages. The template files are mostly identified with the .rex extension name which usually comes before the code file extension name. In spoova, there are three types of template files which can be easily identified by their extension names. The main template files are the PHP templates which are identified by the .rex.php extension name. However, two other secondary template files are the .rex.css and .rex.js template files specified for css and javascript files respectively. These files are secondary templates because they are loaded and compiled within the main php template files. Template files are loaded or compiled using compiler functions from within route files some of which have been integrated as methods into Window files and is easily inherited by routes.

Template Compilers
Template compilers are functions or Window methods that are directly built for rendering template files. Although the main template rendering is now handled by the Compiler class, the framework provides some methods and functions to make it easier to compile templates. Learn more from here.
Template Directives
Template directives are helper directives that makes it easier to work with template files. They sometimes provide extended functions and access to top level functions within the framework. Learn more from here.
Template Files
Template files are identified by their real file extension names preceeded by the .rex template file identifier. The primary or main template are usually of php extension name while the secondary template files are layout structures for javascript and css files. These secondary files employ their normal file extension names but are similarly preceeded by the .rex template extension identifier. Learn more from here.
Template On The Go (TOTG)
The Template-On-The-Go functionality is an extended feature that makes it easier to quickly generate template files when working within routes. Athough this process requires a manual code setup, it is a feature than can reduce the amount of time required to generate template files. Learn more from here.