This software provides lightweight PHP templates, making it easy for developers to create and manage their web applications efficiently. It simplifies the structure of code, enhances flexibility, and streamlines the development process while delivering a fast performance.
Templates in Templights consist of blocks that can be nested or extended. These blocks are defined by open tag {% and closed by close tag %}. The block name must be an uppercase alphanumeric word and must be defined after the open tag. The content of the block is defined inside curly braces. For instance, {% BLOCK { This is content of a block named BLOCK. {% SUB { This is sub-block named SUB. }%} }%}.
Blocks can be extended easily by replacing the block name with the parent template filename. Here's an example: {% template.tpl { {% BLOCK { This content will override content of block named BLOCK from template file template.tpl }%} }%}.
One great feature of Templights is that you can include PHP tags inside blocks. To create more readable code, it is recommended to use PHP alternative syntax for control structures. For example, {% LIST {
Lastly, comments in Templights are enclosed by {%% and %%} tags. Comments can be one-liners or spread over multiple lines. For example: {%% This is one line comment! %%} and {%% Comments can be spreaded over many lines. %%}. Overall, Templights is a fantastic template system that offers great features and flexibility.
Version 0.1.3.1: N/A