All Projects → dwoo-project → Dwoo

dwoo-project / Dwoo

Licence: lgpl-3.0
[UNMAINTAINED] php template engine

Projects that are alternatives of or similar to Dwoo

Twital
Twital is a "plugin" for Twig that adds some sugar syntax, which makes its templates similar to PHPTal or VueJS.
Stars: ✭ 116 (-29.27%)
Mutual labels:  template-engine
Stick
A golang port of the Twig templating engine
Stars: ✭ 132 (-19.51%)
Mutual labels:  template-engine
Hsweb Expands
文件压缩解压、office文档读写、http,ftp请求模拟、shell执行、模板引擎
Stars: ✭ 160 (-2.44%)
Mutual labels:  template-engine
String template
A template engine for Rails, focusing on speed, using Ruby's String interpolation syntax
Stars: ✭ 122 (-25.61%)
Mutual labels:  template-engine
Jxls
Java library for creating Excel reports using Excel templates
Stars: ✭ 128 (-21.95%)
Mutual labels:  template-engine
Bbmustache
Binary pattern match Based Mustache template engine for Erlang/OTP.
Stars: ✭ 141 (-14.02%)
Mutual labels:  template-engine
Dna.js
🧬 An uncomplicated user interface library for building data-driven semantic templates
Stars: ✭ 114 (-30.49%)
Mutual labels:  template-engine
Windowstemplatestudio
Windows Template Studio quickly builds a UWP app, using a wizard-based UI to turn your needs into a foundation of Windows 10 patterns and best practices.
Stars: ✭ 2,089 (+1173.78%)
Mutual labels:  template-engine
Yii2 Twig
Yii 2 Twig extension.
Stars: ✭ 130 (-20.73%)
Mutual labels:  template-engine
100 Lines Of Code Challenge Js
Write Everything in JavaScript under 100 Lines!!!😈
Stars: ✭ 157 (-4.27%)
Mutual labels:  template-engine
Tera
A template engine for Rust based on Jinja2/Django
Stars: ✭ 1,873 (+1042.07%)
Mutual labels:  template-engine
Tempy
Python Object Oriented Html Templating System
Stars: ✭ 126 (-23.17%)
Mutual labels:  template-engine
Aeromock
Lightweight mock web application server
Stars: ✭ 152 (-7.32%)
Mutual labels:  template-engine
Handlebars Iron
Handlebars middleware for Iron web framework
Stars: ✭ 119 (-27.44%)
Mutual labels:  template-engine
Foil
PHP template engine for native PHP templates
Stars: ✭ 162 (-1.22%)
Mutual labels:  template-engine
Bem Xjst
bem-xjst (eXtensible JavaScript Templates): declarative template engine for the browser and server
Stars: ✭ 115 (-29.88%)
Mutual labels:  template-engine
Westwind.razorhosting
Hosting the Razor Runtime outside of ASP.NET/MVC for use in non-Web .NET applications.
Stars: ✭ 136 (-17.07%)
Mutual labels:  template-engine
Spring Boot Email Tools
A set of services and tools for sending emails in a Spring Boot 1.5.x application using a Template Engine
Stars: ✭ 164 (+0%)
Mutual labels:  template-engine
Pongo2
Django-syntax like template-engine for Go
Stars: ✭ 2,111 (+1187.2%)
Mutual labels:  template-engine
Phptal
PHP Template Attribute Language — template engine for XSS-proof well-formed XHTML and HTML5 pages
Stars: ✭ 155 (-5.49%)
Mutual labels:  template-engine

Dwoo

Latest Stable Version Total Downloads License Build Status Scrutinizer Code Quality Gitter

Dwoo is a PHP5/PHP7 Template Engine that was started in early 2008. The idea came from the fact that Smarty, a well known template engine, is getting older and older. It carries the weight of it's age, having old features that are inconsistent compared to newer ones, being written for PHP4 its Object Oriented aspect doesn't take advantage of PHP5's more advanced features in the area, etc. Hence Dwoo was born, hoping to provide a more up to date and stronger engine.

So far it has proven to be faster than Smarty in many areas, and it provides a compatibility layer to allow developers that have been using Smarty for years to switch their application over to Dwoo progressively.

Dwoo 1.3.x is compatible from PHP 5.3.x to PHP 7.x

Documentation

Dwoo's website to get the latest version is at http://dwoo.org/
The wiki/documentation pages are available at http://dwoo.org/documentation/

Requirements

License

Dwoo is released under the GNU LESSER GENERAL PUBLIC LICENSE V3 license.

Quick start - Running Dwoo

Basic Example

<?php
// Include Composer autoloader
require __DIR__ . '/vendor/autoload.php';

// Create the controller, this is reusable
$dwoo = new Dwoo\Core();

// Load a template file (name it as you please), this is reusable
// if you want to render multiple times the same template with different data
$tpl = new Dwoo\Template\File('path/to/index.tpl');

// Create a data set, if you don't like this you can directly input an
// associative array in $dwoo->get()
$data = new Dwoo\Data();
// Fill it with some data
$data->assign('foo', 'BAR');
$data->assign('bar', 'BAZ');

// Outputs the result ...
echo $dwoo->get($tpl, $data);
// ... or get it to use it somewhere else
$dwoo->get($tpl, $data);

Loop Example

<?php
// To loop over multiple articles of a blog for instance, if you have a
// template file representing an article, you could do the following :

require __DIR__ . '/vendor/autoload.php';

$dwoo = new Dwoo\Core();
$tpl = new Dwoo\Template\File('path/to/article.tpl');

$pageContent = '';
$articles = array();

// Loop over articles that have been retrieved from the DB
foreach($articles as $article) {
    // Either associate variables one by one
    $data = new Dwoo\Data();
    $data->assign('title', $article['title']);
    $data->assign('content', $article['content']);
    $pageContent .= $dwoo->get($tpl, $data);

    // Or use the article directly (which is a lot easier in this case)
    $pageContent .= $dwoo->get($tpl, $article);
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].