i have this class:
<?php
class template{
public function blocks($blockName, $id){
return "<div id='$id'>".loadModule($blockName)."</div>";
}
}
$tmp = new template();
?>
what changes needed for i use $tmp object in pages with:
<tmp:blocks id="polls1" blockName="polls" />
OR
[tmp.blocks("polls1", "polls")]
OR
{tmp.blocks["polls1", "polls"]}
instead php code:
<?php echo $tmp->blocks("polls", "polls1");?>
Is it possible?

New Topic/Question
Reply



MultiQuote




|