Make Sidebar Item only show on the home page.
I created a simple mod for xcart 5 that adds a menu item to the sidebar called Quick Links. Everything works fine with the mod. It shows up in the side bar just like it is supposed to, but I want it to only show on the home page. Where as now it shows on every page with the sidebar. What is the easiest way to accomplish this?
Below is my QuickLinks.php <?php namespace XLite\Module\Pmall\QuickLinks\View; /** * @ListChild (list="sidebar.first", zone="customer", weight="101") */ class QuickLinks extends \XLite\View\SideBarBox { protected function getHead() { return 'Quick Links'; } protected function getDir() { return 'modules/Pmall/QuickLinks/menu'; } } |
Re: Make Sidebar Item only show on the home page.
In your QuickLinks class add method isVisible() like this:
PHP Code:
and it should do the trick. Tony |
Re: Make Sidebar Item only show on the home page.
Thank you very much. That worked.
|
All times are GMT -8. The time now is 08:48 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.