I have created a custom module but having a little difficulty with blocks in the config.xml
For some reason I'm not able to get the blocks to show on the dump of all the xml…maybe I've missed something?
I have the following structure:
app\code\local\Site\SiteTest\etc\config.xml
app\code\local\Site\SiteTest\Block\test.php
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Site_Test>
<version>1.0.0</version>
</Site_Test>
</modules>
<global>
<blocks>
<highest>
<class>Site_Block</class>
</highest>
</blocks>
</global>
</config>
I am trying to link this to a custom layout for example:
<block type="sitetest/test" name="home.catalog.product.test" template="catalog/product/test.phtml" after="cms_page">
If anyone could shed some light on this would really be appreciated.
Best Answer
Since you have provided less info about your module I can suggest the following corrections only. Hope it might useful.
1). There are some mis-configurations in your
config.xml
file. See the below code (corrected one)2). Rename your block class file as
Test.php
So the block class declaration should be as follow.
3). Make sure you have written the module activation file in
app/etc/modules
folder. It should beSite_SiteTest.xml
with the following content.4). Make sure the cache is disabled. (go to
System > Cache Management
and select all, then disabled them)