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