|
thank you very much
i tried the solution explained by Moshe, but noting was displayed on my CMS page, and i don’t now why !!!
and my code :
1- C:\wamp\www\magento-1.1.2\magento\app\code\local\Reda\Custom\etc\config.xml
<?xml version="1.0"?> <config> <global> <blocks> <reda_custom> <class>Reda_Custom_Block</class> </reda_custom> </blocks> </global> </config>
2- C:\wamp\www\magento-1.1.2\magento\app\etc\modules\Reda.xml
<?xml version="1.0"?> <config> <modules> <Reda_Custom> <active>true</active> <codePool>local</codePool> </Reda_Custom> </modules> </config>
3- C:\wamp\www\magento-1.1.2\magento\app\code\local\Reda\Custom\Block\Test.php
<?php
class Reda_Custom_Block_Test extends Mage_Core_Block_Abstract { protected function _toHtml() { $html="hello world"; return $html; } } ?>
4- finaly in : CMS -> Manage Pages i choose the home page, and in it’s content i add :
{{block type="reda_custom/test" }}
what’s wrong ??!!
|