首页顶部滑块如何在类别页面中显示?

时间:2014-03-12 13:26:41

标签: magento-1.8

我的主页是1column.phtml,我的类别页面是2columns-right.phtml。在主页中有一个特色滑块位于路径模板\\ternal \ homeslider \ slideshow.phtml中,但我必须在类别页面中显示此滑块,即2columns-right.phtml。我怎样才能做到这一点。 请帮忙。 提前谢谢。

1 个答案:

答案 0 :(得分:0)

您可以使用以下类别页面条件调用2columns-right.phtml中的精选滑块/ phtml。

$request = $this->getRequest();
$controller = $request->getControllerName();
if($controller == 'catalog_category_view){
    //call your block of slider
}

它只会在类别页面中显示滑块。