2014-03-12 38 views
2

我的主页是1column.phtml,我的分类页面是2columns-right.phtml。在主页中有一个精选滑块,它位于路径模板\ eternal \ homeslider \ slideshow.phtml中,但我必须在类别页面中显示此滑块,该类别页面是2columns-right.phtml。我怎样才能做到这一点。 请帮忙。 在此先感谢。首页顶部滑块如何显示在类别页面?

回答

0

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

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

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