Magento is a display block, but only shows when I call it with getChildHtml

I created a block and I put it in an xml layout and it shows my theme correctly. My problem is that I really don't want it to appear until I explicitly name it with getChildHtml ('myblock').

My xml block looks like this:

<block type="page/html" name="myblock" as="myblock" template="page/html/myblock.phtml"/ > 

Does anyone know how to achieve this?

thanks

+4
source share
1 answer

Place your block inside another which is not of type core/list and does not call $this->getChildHtml('') (note the empty line). Thus, it will not be shown automatically, and you can call it as you wish.

+4
source

All Articles