January 27th, 2021 at 6:49 AM
I've done some more work refining this, and am now using it in a homegrown project of my own. It's actually managed to get the attention of a few folks I know from various places, so I'm glad to see that it seems to be in use so far.
Information Page: https://github.com/Darth-Apple/simple-ph...lates/wiki
Features implemented:
Footprint:
Lines: 231
Size: 8.3KB
Files: 1
Though it has grown, its lightweight spirit has remained a top priority during the development. It still weighs in under 10KB and is fully functional, containing many of the same features offered by the larger, more popular engines!
Information Page: https://github.com/Darth-Apple/simple-ph...lates/wiki
Features implemented:
- Template inheritance (extensions)
- Allows a parent page to contain basic layout (header, footer, etc) with a child template containing page-specific data.
- Allows blocks to be injected into a parent template at predefined locations
- Allows a parent page to contain basic layout (header, footer, etc) with a child template containing page-specific data.
- Listeners/Events (template hooks)
- These allow functions to be called at predefined locations within the templates.
- These are very useful for menus or sidebar blocks, where the content may need to be appended dynamically within PHP.
- These allow functions to be called at predefined locations within the templates.
- If/else blocks
- Language packs/locale strings
- Basic substitution variables
- Template loops (PHP foreach)
- Autoescape variables (XSS protection)
- Template backreferences (include another template within a template)
- Compiles to vanilla PHP (for native performance)
Footprint:
Lines: 231
Size: 8.3KB
Files: 1
Though it has grown, its lightweight spirit has remained a top priority during the development. It still weighs in under 10KB and is fully functional, containing many of the same features offered by the larger, more popular engines!