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

passing an argument between templates
 
altansar
Member
 
Total Posts:  51
Joined:  2008-07-08
 

Hello everybody,

I’am writing a costum module for magento, and I have a question.

My module is used in the catalog/product/view.phtml template by the method

$this->getProductCommentsHtml($prod_id)
.

This method :

public function getProductCommentsHtml($prod_id)
{
     
return $this->getBlockHtml('product_comments');
}

ask Magento to display the block product_comments. The problem with the method getBlockHtml is that it can’t pass an argument to the template file that it call.

I need the core of my product_comment module to know which product is used by the product_view module who call him.
So is it possible to pass an argument from a template file to a “child template”.

Thanks, and sorry for my english wink

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