dmanexe
dmanexe

Reputation: 1029

How do I place Magento theme blocks?

I am using two plugins, easycatalogimg and bannerslider.

For sanity purpose, I am using the default Magento theme, I am just trying to learn the template engine.

When I enable easycatalogimg, it appears above the bannerslider on the homepage. I am using the following code to call bannerslider.phtml, within CMS -> Homepage.

{{block type='bannerslider/bannerslider' template='bannerslider/bannerslider.phtml'}}

I would like to call the bannerslider, then easycatalogimg. Problem is, I cannot determine what block type easycatalogimg is. If I could, I would just turn off the homepage display, and then place the block beneath that. When I turn on the setting to make easycatalogimg appear on the homepage, it inserts itself above the rest of the page content.

Are there files I can open to determine what block type easycatalogimg is? Then I could do this code, right under the bannerslider.

{{block type='foo/bar' template='default/default/easycatalogimg.home.phtml'}}

Right now, the easycatalogimg appears on the homepage.

IN AN IDEAL WORLD, the solution here would be that I would edit a page like...

frontend/base/default/template/cms/content_heading.phtml

...within that page, call out the bannerslider.phtml and easycatalogimg/homepage.phtml.

Upvotes: 0

Views: 357

Answers (1)

pspahn
pspahn

Reputation: 2790

Open the template file of the block you want to know the type. If it's a default Magento template, it will generally have the Block_Class name at the top. If it doesn't, run:

<?php echo get_class($this) ?>

That will give you the Block_Class name which then gets translated into Magento's calling convention, such as:

<?php $block = $this->getLayout()->getBlock('core/template') ?>

Where 'core/template' gets translated into Mage_Core_Block_Template

Upvotes: 1

Related Questions