How to use com_finder in my extension

For Joomla! 4.x Coding related discussions, you could also use: http://groups.google.com/group/joomla-dev-general

Moderators: ooffick, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
RaulOG
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Apr 23, 2024 12:32 pm

How to use com_finder in my extension

Post by RaulOG » Tue Apr 23, 2024 1:12 pm

Hi.

I am developing a plugin for a component for my J4 website and I would like to obtain the total number of results of a search using smart search component.

I would think all I need is to 1) grab the smart search model, 2) set the keyword for the query and 3) get the total

Getting the model can be done following these docs https://docs.joomla.org/J4.x:Dependency ... n_Joomla_4

I am unsure of what's the public interface of the SearchModel that I can use to set the keyword. I found `setState` but after a few attempts I don't seem to have it working.

I am also unsure if getTotal() is the method to get the total number of results.

Someone care to elaborate on how to use finder component within an extension? Even better if you can point out some docs. Thank you!
Last edited by toivo on Tue Apr 23, 2024 1:56 pm, edited 1 time in total.
Reason: mod note: moved from 4.x Extensions

Post Reply

Return to “Joomla! 4.x Coding”