- Posts: 8
- Thank you received: 1
Hide Categories in Filter Dropdown
- Steve Brown
- Topic Author
- Offline
- New Member
Less
More
2 years 10 months ago - 2 years 10 months ago #144326
by Steve Brown
Hide Categories in Filter Dropdown was created by Steve Brown
Hello Tuan,
Really enjoying the product.
I have a question/request. When using the Front End Plan Manager, is it possible to hide the categories the logged in user has no access to per the "access level" set in the category?
All of my plans are listed in the dropdown. If the user clicks on a category and does not have access to that category, the filter refreshes and is blank, which is great. But, could you not have the category in the filter in the first place?
I have reviewed the code and found references to authorized view level, but cannot locate the query that builds that filter dropdown in the toolbar.
Thank you in advance....
Really enjoying the product.
I have a question/request. When using the Front End Plan Manager, is it possible to hide the categories the logged in user has no access to per the "access level" set in the category?
All of my plans are listed in the dropdown. If the user clicks on a category and does not have access to that category, the filter refreshes and is blank, which is great. But, could you not have the category in the filter in the first place?
I have reviewed the code and found references to authorized view level, but cannot locate the query that builds that filter dropdown in the toolbar.
Thank you in advance....
Last edit: 2 years 10 months ago by Steve Brown. Reason: added pic for clarity
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
2 years 10 months ago #144328
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Hide Categories in Filter Dropdown
Hello Steve
The method is buildCategoryDropdown in components/com_osmembership/helper/html.php
You can modify the query inside that method to below code and it should be fine:
The method is buildCategoryDropdown in components/com_osmembership/helper/html.php
You can modify the query inside that method to below code and it should be fine:
Code:
$query->select('id, parent_id, title')
->from('#__osmembership_categories')
->where('published=1')
->where('access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')');
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2024 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.