A better way of registering a block tags?
Posted: Mon Jun 12, 2006 6:27 pm
Hi. I'm running CMS Made Simple 0.13 Canary.
I wanted to register a block tag :
CMS Made Simple doesn't seem to be designed to accept them natively. There is no hook like for function tags. So, I've modified the source code of lib\content.functions.php. I've added the block type in the plugins registering loop :
Now, I can create block.my_tag.php in the plugin folder, the same way as for regular function tags, function.my_tag.php. I works, but on next update of CMS Made Simple, I'll to edit once again lib\content.functions.php.
Is there a better way of registering block tags, without hacking CMS's core? Maybe with a module?
I wanted to register a block tag :
Code: Select all
{my_tag} ... {\my_tag}Code: Select all
Near line 671 :
$types=array('function','compiler','prefilter','postfilter','outputfilter','modifier','block');
Near line 710 :
case 6: $smarty->register_block($file, "smarty_cms_block_" . $file); break;Is there a better way of registering block tags, without hacking CMS's core? Maybe with a module?