4

I have created a block and I have placed it in to the layout xml and it is showing correctly in my theme. My problem is that I actually don't want it to display until I explicitly call it with getChildHtml('myblock').

My block xml looks like this:

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

Anyone have a clue how to achieve this?

Thanks

sulman
  • 2,431
  • 7
  • 40
  • 62

1 Answers1

4

Place your block inside another that is neither a core/list type nor calls $this->getChildHtml('') (note the empty string). That way it will not be shown automatically and you are free to call it at your discretion.

clockworkgeek
  • 37,650
  • 9
  • 89
  • 127