Magento从页面布局中获取产品(如1column.phtml)

Magento从页面布局中获取产品(如1column.phtml),magento,templates,magento-1.7,product,Magento,Templates,Magento 1.7,Product,我正在使用Magento 1.7 我已经创建了一个自定义页面布局(parallaxe.phtml) 产品与此自定义页面布局关联 我在产品视图页面上,显示我的自定义布局页面。 我想直接从此页面访问我的产品信息 $_product = $this->getProduct(); 返回null:( 有什么想法吗?我假设您的模板附加到core/template类型的块(或其他未设置产品变量的块) 通过调用$product=Mage::registry('current_product');或$pr

我正在使用Magento 1.7

我已经创建了一个自定义页面布局(parallaxe.phtml)
产品与此自定义页面布局关联

我在产品视图页面上,显示我的自定义布局页面。
我想直接从此页面访问我的产品信息

$_product = $this->getProduct();
返回
null
:(


有什么想法吗?

我假设您的模板附加到core/template类型的块(或其他未设置产品变量的块)

通过调用
$product=Mage::registry('current_product');
$product=Mage::registry('product');