Skip to content
This repository has been archived by the owner on Jun 14, 2019. It is now read-only.

Teddy95/Modeler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Modeler

Modeler is a small php template engine.


Benefits

  • Define variables and include templates
  • Use language variables in json files
  • Build fast and easy templates

Installation

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!

Documentaion

https://github.com/Teddy95/EasyRouter/wiki


Download


Contributors


License

The MIT License (MIT) - View LICENSE.md