Try the Demo

Magento Forum

   
Magento Custom Module layout not loading
 
arora
Jr. Member
 
Total Posts:  6
Joined:  2010-08-16
 

Hi

I am trying to create a custom module in magento. I have added two functions in the controller. First function is working correctly. But when I run the second function “manage”, then controller is showing me the array. But view not loading. I think the problem occurs while calling the view from adminhtml.

Please find attach zip folder containing my config.xml, controller file and layout slider.xml file.

Please help me in resolving the issue.

Regards

File Attachments
slider module.zip  (File Size: 3KB - Downloads: 10)
 
Magento Community Magento Community
Magento Community
Magento Community
 
TreInnova
Sr. Member
 
Avatar
Total Posts:  291
Joined:  2009-02-20
Fano
 
arora - 08 February 2013 04:53 AM

Hi

I am trying to create a custom module in magento. I have added two functions in the controller. First function is working correctly. But when I run the second function “manage”, then controller is showing me the array. But view not loading. I think the problem occurs while calling the view from adminhtml.

Please find attach zip folder containing my config.xml, controller file and layout slider.xml file.


Please help me in resolving the issue.


Regards

Hi ,
this:

function manageAction()
    
{
        $model          
=   Mage::getModel('slider/slider');
        
$imageData      =   $model->getAllImages();
        echo 
"<pre>";
        
print_r$imageData );
        echo 
"</pre>";

        
//$model->getImageData();

    
}
Should be :
function manageAction()
    
{
        $model          
=   Mage::getModel('slider/slider');
        
$imageData      =   $model->getAllImages();
         
// you should pass $imageData to block
         
$this->loadLayout()->renderLayout();
    
}
? am i correct?
regards
Filippo

 Signature 

3Innova.com
Sviluppo moduli e consulenza ecommerce magento

 
Magento Community Magento Community
Magento Community
Magento Community
 
arora
Jr. Member
 
Total Posts:  6
Joined:  2010-08-16
 

Hi TreInnova,

Yes it works.

Thank you..

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