I am trying to create my own module to override / extend Mage_Cms_Model_Resource_Page.

This is what I have so far

1) Enable the module by creating /app/etc/modules/Namespace_ModuleName.xml


2) Set up the config /app/code/local/Namespace/ModuleName/etc/config.xml

 <?xml version="1.0"?> 

3) Set up the new model - /app/code/local/Namespace/ModuleName/Model/Resource/Page.php

class Namespace_ModuleName_Model_Resource_Page extends Mage_Cms_Model_Resource_Page
    protected function _getLoadSelect($field, $value, $object)
        echo 'test';

However when I load a cms page nothing happens but I can see whats wrong. Can anyone advise please


Your issue at wrong calling for resource type at config.xml

it should be cms_resource from page_resource.

As per as ,magento cms_resource resource type class is Mage_Cms_Model_Resource

See at config.xml of Mage_Cms Module:

  • good catch +1 from me@Amit bera – Keyur Shah May 15 '15 at 10:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.