Search events module - sort categories manually?
- Philipp
- Topic Author
- Offline
- Senior Member
Less
More
5 years 11 months ago - 5 years 11 months ago #113238
by Philipp
Search events module - sort categories manually? was created by Philipp
Hi there,
I use the "Search events" module on my timeline view, and it is critical to my customer. Is there a way to manually sort the entries as they appear in the dropdown list, esp. the categories? The current order is desc alphabetically by category name, which is a good default but how I would want to rank them.
Many thanks, as always, Philipp
I use the "Search events" module on my timeline view, and it is critical to my customer. Is there a way to manually sort the entries as they appear in the dropdown list, esp. the categories? The current order is desc alphabetically by category name, which is a good default but how I would want to rank them.
Many thanks, as always, Philipp
Last edit: 5 years 11 months ago by Philipp.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 11 months ago #113249
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Search events module - sort categories manually?
Hi Philipp
Could you please send me the link to that page on your site? I want to take a look at it to know exactly what page are being used and give you the correct answer
Regards,
Tuan
Could you please send me the link to that page on your site? I want to take a look at it to know exactly what page are being used and give you the correct answer
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Philipp
- Topic Author
- Offline
- Senior Member
5 years 11 months ago #113275
by Philipp
Replied by Philipp on topic Search events module - sort categories manually?
Hi Tuan,
absolutely, here it is: ifqh.de/termine
It's the middle one called "Seminartypen" in my translation, that is the categories of events. Note that sorting by id would not do in my case, as this is also not the order I seek.
Many thanks, Philipp
absolutely, here it is: ifqh.de/termine
It's the middle one called "Seminartypen" in my translation, that is the categories of events. Note that sorting by id would not do in my case, as this is also not the order I seek.
Many thanks, Philipp
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 11 months ago #113311
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Search events module - sort categories manually?
Hi
It's ordered by name at the moment. I think ordered by name will make it easier for user to find the category they want
If you want to change it, I think you can change it to ordering. Look at modules/mod_eb_search/mod_eb_search.php, find this block of code:
Change it to:
And then you can go to Events Booking -> Categories, order the categories to the order you want
Regards,
Tuan
It's ordered by name at the moment. I think ordered by name will make it easier for user to find the category they want
If you want to change it, I think you can change it to ordering. Look at modules/mod_eb_search/mod_eb_search.php, find this block of code:
Code:
$query->select('id, parent AS parent_id')
->select($db->quoteName('name' . $fieldSuffix, 'title'))
->from('#__eb_categories')
->where('published = 1')
->where('`access` IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')
->order('name');
Change it to:
Code:
$query->select('id, parent AS parent_id')
->select($db->quoteName('name' . $fieldSuffix, 'title'))
->from('#__eb_categories')
->where('published = 1')
->where('`access` IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')
->order('ordering');
And then you can go to Events Booking -> Categories, order the categories to the order you want
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Philipp
- Topic Author
- Offline
- Senior Member
5 years 11 months ago #113325
by Philipp
Replied by Philipp on topic Search events module - sort categories manually?
Hi Tuan,
great, works perfectly, many thanks. As I said, ordering by name makes for a good default, but when you have two categories that make up about 80% of your events, and some once-a-year outliers, you want those categories to be at the top. Or it's just me...
Last follow-up: do I need an override file, or is this edit update-stable?
Many thanks, Philipp
great, works perfectly, many thanks. As I said, ordering by name makes for a good default, but when you have two categories that make up about 80% of your events, and some once-a-year outliers, you want those categories to be at the top. Or it's just me...
Last follow-up: do I need an override file, or is this edit update-stable?
Many thanks, Philipp
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 11 months ago #113328
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Search events module - sort categories manually?
Unfortunately, that code could not be override. We can only override the layout file in module, not the code
You can get this file, unzip it, upload to PATH_TO_TEMPLATE/html/mod_eb_search and it should work in the same way, plus, it won't be lost when you update to future releases of the extension
Regards,
Tuan
You can get this file, unzip it, upload to PATH_TO_TEMPLATE/html/mod_eb_search and it should work in the same way, plus, it won't be lost when you update to future releases of the extension
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Philipp
- Topic Author
- Offline
- Senior Member
5 years 11 months ago #113331
by Philipp
Replied by Philipp on topic Search events module - sort categories manually?
Excellent: many thanks!
Please Log in or Create an account to join the conversation.
- Philipp
- Topic Author
- Offline
- Senior Member
5 years 11 months ago #113617
by Philipp
Replied by Philipp on topic Search events module - sort categories manually?
Hi Tuan,
the recent update to 3.5.1 did indeed kill our little override, despite the default.php in PATH_TO_TEMPLATE/html/mod_eb_search. Any idea what went wrong, and how to get an update-proof solution for this?
Many thanks, Philipp
the recent update to 3.5.1 did indeed kill our little override, despite the default.php in PATH_TO_TEMPLATE/html/mod_eb_search. Any idea what went wrong, and how to get an update-proof solution for this?
Many thanks, Philipp
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
5 years 10 months ago #113636
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Search events module - sort categories manually?
Hi Philipp
I have no clue about why it's being lost. You need to replace PATH_TO_TEMPLATE with the actual path of your site template
If you want, submit a support ticket sending us super admin account of the site and link to the page which the module is being displayed
I will check to see what's wrong and correct it for you
Regards,
Tuan
I have no clue about why it's being lost. You need to replace PATH_TO_TEMPLATE with the actual path of your site template
If you want, submit a support ticket sending us super admin account of the site and link to the page which the module is being displayed
I will check to see what's wrong and correct it for you
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Philipp
- Topic Author
- Offline
- Senior Member
5 years 10 months ago #113637
by Philipp
Replied by Philipp on topic Search events module - sort categories manually?
Hey Tuan,
don't worry, I recognize a variable when I see one: The file was placed under /html/mod_eb_search in my current template path
I' send you the data via ticket. Many thanks!
Philipp
don't worry, I recognize a variable when I see one: The file was placed under /html/mod_eb_search in my current template path
I' send you the data via ticket. Many thanks!
Philipp
Please Log in or Create an account to join the conversation.
Moderators: Tuan Pham Ngoc
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.