[solved] Show brands in menu dropdown
I have installed the "Show By Brand" module. I would like to list all of the site's brands in a dropdown menu in the navigation of every page. I added this code to the nav:
HTML Code:
<widget class="XLite\Module\QSL\ShopByBrand\View\BrandsBlock" limit="10000" /> That displays the brands correctly on the home page, but nowhere else. I know that the "BrandsBlock" widget is only meant to be used on the home page, which is probably why it is only showing up on the homepage. But I don't know how else to get all of the brands in a list on every page. Please help! |
Re: Show brands in menu dropdown
Check the module for getAllowedTargets() method. Decorate the module to expand the allowed targets.
|
Re: Show brands in menu dropdown
I tried to decorate that method, but I can't figure out how to allow all targets. Is there a keyword to allow everything? If not, is there some list of all possible targets that I can use?
|
Re: Show brands in menu dropdown
Returning an empty array in getAllowedTargets() will make the widget visible on all pages. I.e. you should do something like this:
PHP Code:
The @LC_Dependencies ("QSL\ShopByBrand") statement is here to make your code apply over the code added by Shop By Brand module (otherwise XC5 may run the original module's method after yours and this will ignore your modification). |
Re: Show brands in menu dropdown
xplorer, that worked perfectly. Thank you!
|
All times are GMT -8. The time now is 08:21 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.