the right place for saving a central idcheck-routine

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.
Locked
hgh-esn
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sun Jun 27, 2010 10:42 am

the right place for saving a central idcheck-routine

Post by hgh-esn » Fri Oct 15, 2021 7:15 pm

Hi to all here,

I wan't to expand the online search filter
id:nn (nn = 1... 99999) in listviews for articles, categories, users, etc. to something like
id:nn1, nn2, nn3,.... or
id:nn1-nn3 (short way of the above) in a future J4. x release.

At the moment, the inline id:search is coded in any existing listview explicitly.

In my solution, I will build a central routine, which is called by any listview (article, categories, etc.)

And now the question:

Where is the right place to store it, so that it will be found from everywhere?

What are the php conditions in Joomla for that?

thanks for any answer
HGH

User avatar
ceford
Joomla! Hero
Joomla! Hero
Posts: 2654
Joined: Mon Feb 24, 2014 10:38 pm
Location: Edinburgh, Scotland
Contact:

Re: the right place for saving a central idcheck-routine

Post by ceford » Sat Oct 16, 2021 4:15 pm

The search field gets used in the model getListQuery function. I think you will have to override that function in each view in which you wish to use the new behaviour. That means you will have to subclass the model and load it before Joomla loads the standard version. You can do that with a plugin. I don't think there is any way to change the behaviour of every similar search function with the same bit of code.


Locked

Return to “Joomla! 4.x Coding”