Magento Coding Solutions

Custom Tags within the files HTML

 <?php

 define('DESIGN','Apple');
 define('ABC','Mango');


function replaceTags($body)
{
 $body = preg_replace('!\{{(.*?)}}!Uei', "''.constant('$1').''", $body);
return $body;
}
ob_start("replaceTags");


?>
{{ABC}}
{{DESIGN}}
<!--***ALL OF YOUR HTML CODE HERE*** -->
<?
ob_end_flush();
?>

No comments:

Post a Comment