PHPackages                             bephp/microtpl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. bephp/microtpl

ActiveLibrary[Templating &amp; Views](/categories/templating)

bephp/microtpl
==============

small template attribute language implemention for PHP (using xml\_parse)

v1.0.6(10y ago)880612MITPHPPHP &gt;=5.3.0

Since Sep 15Pushed 10y ago2 watchersCompare

[ Source](https://github.com/bephp/microtpl)[ Packagist](https://packagist.org/packages/bephp/microtpl)[ Docs](https://lloydzhou.github.io/microtpl/)[ RSS](/packages/bephp-microtpl/feed)WikiDiscussions xml Synced 1mo ago

READMEChangelogDependenciesVersions (8)Used By (2)

MicroTpl
========

[](#microtpl)

MicroTpl is small templating system for PHP.

Install
-------

[](#install)

```
composer require bephp/microtpl

```

There is one [Blog demo](https://github.com/bephp/blog), work with [ActiveRecord](https://github.com/bephp/activerecord) and [Router](https://github.com/bephp/router).

Example
-------

[](#example)

### layout.

[](#layout)

```

	title place holder

	title place holder

	Contents

```

### output layout.htmlc

[](#output-layouthtmlc)

```

```

### index.html

[](#indexhtml)

```

				message1

				message2

			Message # 1
			message1 place holder

			message # 2
			message2 place holder

```

### output index.htmlc

[](#output-indexhtmlc)

```

```

### index.php

[](#indexphp)

```
