Skip to content

Blackxes/TemplaxPhp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Templax - The simple, hookable render framework for Php

Quickstarter:

<!-- template.html -->
<html>
    <head>
        <title>Templax</title>
    </head>
    <body>
        <h1>{{ title }}</h1>
        <p>{{ content }}</p>
    </body>
</html>
# index.php

# adjust your path to the Templax.php
require_once( "your/path/to/templax.php" );

# create and initialize framework
$parser = (new \Templax\Templax)->init([
    "options" => [ "file" => __DIR__ . "/template.html" ]
]);

// markup to define what values are used for the marker
$markup = [
    "title" => "Templax",
    "content" => "my first template"
];

# parse content
$content = $parser->parse( "templax", $markup );

echo $content;

Changelog

[v4]

About

Html Template parsing framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published