Forums › Forums › Search & Filter Pro › Current menu item
- This topic has 17 replies, 2 voices, and was last updated 5 years, 11 months ago by Trevor.
-
Anonymous(Private) February 5, 2019 at 5:02 pm #201300
Hello,
I have a problem with my menu.
When I am on a page, it is highlighted in the menu via css for “current menu item”
When all the parameters are added to the url, it seems to fail to detect that it still is on the page that should be highlighted in the menu.
How do I solve that?Best regards,
JohannesAnonymous(Private) February 5, 2019 at 10:05 pm #201333Oh, wow. I found my mistake. It works. It just didn’t work because my menu item is directed to a url that already has a parameter defined. That leads me to another question:
I need the results to be empty when I enter the page. Thats why I directed the menu item to a nonexisting category, like this:
http://khuf.eu/meine-wege/?_sft_category=leerIs there any way to have an empty results page, when you first enter it?
right now it shows all results:
http://khuf.eu/meine-wege/i dont want that.
best regards! Johannes
Trevor(Private) February 6, 2019 at 8:08 am #201347Yes, that is totally possible. You need to edit the results.php template file you are using, like this:
global $searchandfilter; $sf_current_query = $searchandfilter->get(36613)->current_query(); if ((!$sf_current_query->is_filtered())&&($sf_current_query->get_search_term()=="")) { echo '<div>Nothing to see here folks!</div>'; } else { // your current results.php code here }
Anonymous(Private) February 6, 2019 at 9:21 pm #201513also i am back to the original problem:
menu item marked: http://khuf.eu/meine-wege/
suddenly not marked: http://khuf.eu/meine-wege/?_sft_category=kein-schulabschluss&_sft_post_tag=einfacher-hauptschulabschluss
-
AuthorPosts