L'API de Jinja2 pour faire vos templates en python
In an ideal web system, the HTML used to build a web page would be kept distinct from the application logic populating the web page. This module tries to achieve this by taking over the chore of merging runtime data with a static html template. Template can contain SSI derectives like and It is used ZM::SSI for SSI parsing. If module ZM::SSI not installed SSI derectives will be ignoring.
The ZM::Template module can address the following template scenarios :
Single values assigned to tokens
Multiple values assigned to tokens (as in html table rows)
Single pages built from multiple templates (ie: header, footer, body)
html tables with runtime determined number of columns
An template consists of 2 parts; the boilerplate and the tokens (place holders) where the variable data will sit.
Slim is a PHP micro framework that helps you quickly write simple yet powerful web applications and APIs.
<?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
require 'vendor/autoload.php';
$app = new \Slim\App;
$app->get('/hello/{name}', function (Request $request, Response $response) {
$name = $request->getAttribute('name');
$response->getBody()->write("Hello, $name");
return $response;
});
$app->run();
Package template (html/template) implements data-driven templates for generating HTML output safe against code injection. It provides the same interface as package text/template and should be used instead of text/template whenever the output is HTML.
The documentation here focuses on the security features of the package. For information about how to program the templates themselves, see the documentation for text/template.
mustache.php - A Mustache implementation in PHP.
J'ai créé un nouveau thème pour shaarli à partir de celui de mon blog.
L'archive est la : http://shaarli.memiks.fr/tpl_memiks_shaarli_20140312.tar.bz2
Mémiks
Un système de template PHP en licence libre !