Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Magento Custom Module layout not loading
 
arora
Jr. Member
 
Total Posts:  9
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: 28)
 
Magento Community Magento Community
Magento Community
Magento Community
 
TreInnova
Guru
 
Avatar
Total Posts:  465
Joined:  2009-02-20
Fano
 
arora - 08 February 2013 03: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
 
Magento Community Magento Community
Magento Community
Magento Community
 
arora
Jr. Member
 
Total Posts:  9
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