Modeler is a small php template engine.
- Define variables and include templates
- Use language variables in json files
- Build fast and easy templates
Inlude Modeler.php and create the Modeler object:
<?php
include('Modeler/Modeler.php');
$Modeler = new Modeler\main('../templateDirectory', '../languageDirectory/en-us');
$Modeler->load_template('../template.html');
$Modeler->assign('title', 'Modeler template engine');
$Modeler->assign('name', 'John Doe');
$Modeler->display();
?>
Template file template.html
:
<html>
<head>
<title>{{ title }}</title>
</head>
<body>
<p>My name is {{ name }}!<p>
</body>
</html>
Output:
My Name is John Doe!
https://github.com/Teddy95/EasyRouter/wiki
The MIT License (MIT) - View LICENSE.md