How To Set Dynamic Variable in CMS Content

public function setVariableforCMSBlock($BlockId,$VariableArray=""){

	$block = Mage::getModel('cms/block')
	$filter = Mage::getModel('cms/template_filter');
	return $filter->filter($block->getContent());

use of function 
$test['test1'] = 'test1';
$test['test2'] = 'test2';


you can set content in cms block like

Hello this is {{var test1}} and this is another {{var test2}}

OUTPUT :: Hello this is test1 and this is another test2


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s