Spoova 2.6 Template
The template engine of the framework has been improved with new directives. These are discussed below:
Importing Template
The template compiler function rex() has been assigned as an helper function to render templates. This function has made it easier to relate with template content and provided more extended functionalities. The new directive @rex() is now being introduced as a template directive to make it easier to load an external template from another template. This directive works similarly as the rex() function except that it does not support the chaining of methods. With this new directive, we can easily import web page into another url address. This makes it easier to connect different urls to one single source template file. The code sample below represents a source page template file "sample.rex.php".
sample.rex.php
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Sample Template</title>
  </head>
  <body>
    This is a source template
  </body>
                                            
Now, we can render this source template file above from another template file by using the @rex() directive as shown below
  @rex('sample') <!-- import template --> 
                                        
This new directive may prove useful in linking pages together rather than entirely removing a page. This directive is not expected to be used along with other directives as it only renders an entire content of another template file. An equivalent alias directive to this is the @view() directive.

Loop Directives
New loop directives have been added into the framework. These directives include the @do: @while();, switch conditions and test loops which includes @case():, @default:, @test(): and a new shorthand directive for for loops which is the @loop(): directive. It is suggested to revisit the directives documentation to learn more about these directives.