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

Show custom content using 1column.phtml
 
Julio Vedovatto
Member
 
Total Posts:  33
Joined:  2008-06-18
 

Hello.

I need to create an external page from magento, just with success message.

So, I’m trying use this code:

$layout Mage::getSingleton('core/layout');
$page $layout->createBlock('page/html_header');
echo 
$page->renderView();

Shows only html, not “renderized” page (with menus and search bar).

After looking in some source codes, I found this:

$this->getLayout()->getBlock('root')
            ->
setTemplate('page/1column.phtml');
        
$block $this->getLayout()->createBlock('core/template')
            ->
setTemplate('customer/form/forgotpassword.phtml')
            ->
assign('action'Mage::getUrl('*/*/forgotpasswordpost'));
       
$this->getLayout()->getBlock('root')->setHeaderTitle(__('Password forgotten'));
       
$this->getLayout()->getBlock('content')->append($block);
       
$this->renderLayout();

This is a part of an class, I need to know how to pass it to simple page.

Is there any way to show renderized 1column layout with custom message in the middle content?

I know if I create a custom cms block, then it works, but I don’t want depend of the cms ;(

thnx ;D

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