Save URL for Pre-Filtered Table in Custom Component

For Joomla! 5.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
mb87
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Wed Jan 20, 2010 4:37 pm

Save URL for Pre-Filtered Table in Custom Component

Post by mb87 » Sat Jun 22, 2024 8:45 pm

I have a custom admin component that I built that has a typical, Joomla MVC table. In the table I have the typical search and filter options. The table has data for various clients that I can search and filter for, however what I want to do is to be able to be able to save a URL as a browser favorite that links directly to the pre-filtered table.

My component has the usual parameters; option, view, layout. What I don't have or know how to implement is a search parameter. Is this possible?

For example, when I want to see results for "Client A" I would hope there is a way to save a URL something like this:

https://www.mycomponent.com/administrat ... ch=ClientA

Or if there is a better way to do this I'm open to options.

Thanks in advance for your help!

mb87

MarkRS
Joomla! Explorer
Joomla! Explorer
Posts: 360
Joined: Thu Oct 29, 2009 8:28 am
Location: UK

Re: Save URL for Pre-Filtered Table in Custom Component

Post by MarkRS » Sun Jun 23, 2024 9:12 am

Spooky! I'm just looking at doing something like this (for completely different reasons), so I've been thinking about just this issue! :)

What I'm thinking to do is save all those filters (and in my case, possibly row ids instead) and reapply them for the redisplay.

This doesn't quite lead to a URL for the redisplay, it would need to be a URL that specifies a particular task with an identifying parameter

Not sure if that helps :eek:
It's a community, the more we all contribute, the better it will be.

mb87
Joomla! Apprentice
Joomla! Apprentice
Posts: 42
Joined: Wed Jan 20, 2010 4:37 pm

Re: Save URL for Pre-Filtered Table in Custom Component

Post by mb87 » Mon Jun 24, 2024 3:18 pm

Thanks for the response Mark. I'm hoping there is a clean way to do this. I'll keep looking and I'll post an update here is I find something. Otherwise I'll experiment with your suggestion and also dig deeper into the MVC to see what options might be available that I haven't known about.

Michael


Post Reply

Return to “Joomla! 5.x Coding”