You can create a basic “container” as is done with the “right, left, and content” blocks by just adding something like

<block type="core/text_list" name="myblock" as="myblock"/>

to page.xml. From there you can populate it with content blocks via the layout files as normal.

Basically think of it this way… create as many plain containers as you like in the page.xml file, in your specific page templates (e.g. page/2columns-left.phtml) wrap the getChildHtml like so:

<div id="myblock"><?php echo $this->getChildHtml('myblock') ?></div>

so that you can apply styling to the container, and then create your content blocks via the appropriate layout and make new templates for them there if necessary

<reference name="myblock">
     <block type="core/template" name="myblock.search" as="myblockSearch" template="catalogsearch/myblock.search.phtml"/>
</reference>

So in the above example I referenced the new block in the catalogsearch.xml layout and then added a new content block for searching and created a new template for that content block in the catalogsearch directory.
Hope that all makes sense.

Pin It on Pinterest

Share This