Hi all - has anyone created a live filter for Migx at all?
So I have a MIGX TV set up for all team members.
I want the user to be able to filter them manually via a SELECT by criteria from the fields in the migx TV.
For example, ‘Department’ and ‘Job Title’.
Would also be good if there’s a field where the user could type the name of the user to filter by name too.
I thought I could use getImageList to compile the SELECT menus, but it brings in duplicates (one for each entry).
I thought it would be simple, but getting in a pickle!
You could create a snippet, then use $modx->runSnippet(('getImageList', [...]); to run “getImageList” in the snippet.
Set the property “outputSeparator” for example to ||.
Create an array from the response with explode() and the separator ||.
Then remove the duplicates with array_unique() and maybe sort the array.
Or alternatively write a custom snippet that iterates all the JSON data from the TV.
In general, it’s better to use MIGXdb if you want to be able to filter the data easily.