welcome to ...

pure-PHP templating

Hi. Here is a set of simple php scripts introdusing the idea -

" php - is a great template engine itself "

Better start looking into their source and try to guess what you'll see visiting them in your browser.

home master.php control.php top.php foot.php derived.php block.php helper.php templatelib.php multipass.php
<?include('control.php'); extract($arEXTR_PREFIX_ALL'ar');?>
<?
include('top.php')?>

<h1><?=$ar_title?></h1>

<?if (!function_exists('region1')){function region1($ar){?>
Here is a base list of items<br>
<ul>
<?foreach($ar['items'] as $k=>$v):?>
<li><?=$v['name']?></li>
<?endforeach?>
</ul>
<?}}region1($ar);?>

<?include('foot.php')?>

header: list of 4 items

templating test

Here is a base list of items
  • item1
  • item2
  • item3
  • item4
mail us to test@test.com