Cache key info dynamic code into phtml file

In a phtml file, if you need to instantiate a block without cache you can use this:

$this->getLayout()->createBlock('cms/block')->setBlockId('block_id')->setCacheKey(uniqid())->toHtml();

In the block you can instantiate the page/content that you need like this:

{{block type="core/template" template="page/some_page.phtml"}}

or just write the content directly in there some_page.phtml is in app/design/frontend/base/default/template/page/ 

Comments