PHP Template Engine

About TPLix

TPLix is a fast, secure, and free PHP template engine built around one core idea — keeping your presentation layer completely separate from your application logic.

What is TPLix?

TPLix is a template engine for PHP, facilitating the separation of presentation (HTML/CSS) from application logic. PHP code is your application logic — TPLix handles the presentation using a clean, intuitive {tag} syntax that requires no PHP knowledge.

Under the hood, TPLix compiles your templates into optimised PHP scripts — giving you the simplicity of a tag-based syntax with the raw speed of native PHP execution. Compiled templates are cached and reused, making every page load extremely fast.

100%
Open Source
LGPL
License
PHP
Language
1000+
Sites Using

Built Around These Principles

Every design decision in TPLix traces back to these core values.

Separation of Concerns

PHP handles logic. TPLix handles presentation. A clean boundary between the two makes your codebase easier to read, test, and maintain.

Speed First

Templates compile to native PHP scripts once and are cached. Op-code accelerators like APC and ZendCache work on compiled output for maximum performance.

Security by Design

TPLix sandboxes templates from PHP, letting you grant third-party designers template access without exposing your application code.

Designer Friendly

The {tag} syntax requires zero PHP knowledge. Designers get all the tools they need — loops, conditions, filters — without touching a line of PHP.

Template Inheritance

Manage your entire layout as a single page. Inherit and override blocks of content rather than juggling fragile header/footer include chains.

Framework Agnostic

TPLix is the View layer — plug it into Laravel, CodeIgniter, CakePHP, Zend, or any custom PHP application. It complements your stack, never competes with it.

Cleaner Code. Faster Development.

See the difference TPLix makes in your templates.

PHP Template
<?php foreach($items as $item): ?>
  <li>
    <?php echo htmlspecialchars(
      strtolower($item['name']),
      ENT_QUOTES,'UTF-8'
    ); ?>
  </li>
<?php endforeach; ?>
TPLix Template
{foreach $items as $item}
  <li>
    {$item.name|escape|lower}
  </li>
{/foreach}

Trusted by Developers Worldwide

Thousands of PHP projects rely on TPLix as their presentation layer.

Ready to get started?

Read the documentation and see how TPLix fits into your PHP project.