| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Make Sidebar Item only show on the home page. | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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'; } }
__________________
Ver 5.2.6 |
|||||||
#2
|
|||||||||
|
|||||||||
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
__________________
Found a bug in X-Cart? Post it to our bug tracker! Know how to make X-Cart better? Suggest an idea! |
|||||||||
|
#3
|
|||||||
|
|||||||
Re: Make Sidebar Item only show on the home page.
Thank you very much. That worked.
__________________
Ver 5.2.6 |
|||||||
|
|||
X-Cart forums © 2001-2020
|