Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email

Magento Forum

getChildHtml and block questions
Total Posts:  56
Joined:  2009-02-09

I want to load 2 modified versions of the catalog\category\view.phtml file on separate places in my 3columns.phtml.
What I want is to display categoryname and catalogdescription, on separate places, independet of each other.

This is the to tags that should load the content into my 3columns.phtml file.
<?php echo $this->getChildHtml('getcatalogdescription') ?>
<?php echo $this->getChildHtml('getcatalogname') ?>

in “page.xml” i have done this to make the reference between the getChildHtml and the block tag.
<block type="core/text_list" name="getcatalogname" as="getcatalogname"/>
<block type="core/text_list" name="getcatalogdescription" as="getcatalogdescription"/>

in catalog.xml i have done the follwing blocks. Places in the default section, but also tried to move them outside that handle.
<reference name="getcatalogname">
<block type="catalog/category_view" template="catalog/category/viewcatname.phtml">

<reference name="getcatalogdescription">
<block type="catalog/category_view" template="catalog/category/viewcatdescripton.phtml">

This stuff works when using them one at the time, if i remove the <reference name="getcatalogdescription"> section, the getcatalogname
works, and the other way around it also works.
The problem is when both <reference name="getcatalogname"> and <reference name="getcatalogdescription"> exists at the same time.

Even if i remove the <?php echo $this->getChildHtml('getcatalogdescription') ?> from my layout file, the place where the catalogname should be, shows the catalogdescripton (and the catalogname, too)

Really confusing to me, i thought i understood the basics with loading templates into templates, but i must be missing something.

Does anyone have a clue what ive done wrong, then i would be glad to know smile


Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top