Keyword

Restrict search results

  • Bostjan Cadej
  • Bostjan Cadej's Avatar Topic Author
  • Offline
  • Junior Member
More
7 years 3 days ago #165498 by Bostjan Cadej
Restrict search results was created by Bostjan Cadej
I have categories “New Cars” and “Used Cars” and can specify that search tool will search only in selected category.


K2 Tools module allows you (among other things) to “Select module functionality” as “Search Box” and then “Restrict search results to one or more categories”.


Similar functionality can be achieved by manually altering the search URL: add parameter “categories” and the number of the category. For instance categories=3
www.example.com/component/k2/search.html?searchword=blue%20car&categories=3&format=html&t=&tpl=search




How can this functionality be achieved by “Extra field” type “Searchable Labels”? It searches the whole site. It makes the URL
www.example.com/categoy/categoy/search.html?searchword=blue%20car
So I’m getting results from categories “New Cars”, “Used Cars” and “Uncategorised”.

How can this “Extra field” (type “Searchable Labels”) be adjusted to meet my needs? To display result only from selected categories.

I hope I provided enough information that you’ll be able to understand what I’m trying to achieve.

Thank you

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 11 months ago #165558 by Krikor Boghossian
Replied by Krikor Boghossian on topic Restrict search results
Hello,

Unfortunately searchable labels can't be limited to certain categories.
However since this is all HTML, with a custom JS script you can easily maniputate the text and the link.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum