Finish the basic of tpl.php