dnc123 - 1 year ago

I want to change column that files module use to search for a file, by default it's name, I want to set it to fake_filename, which is another field that I've created through CP and assigned to images folder.

So far what I've found is that the default logic for this problem sits in Anomaly\FilesModule\File\Table\FileTableBuilder, $filters array:


        'search' => [
            'fields' => [
                'name',
                'keywords',
                'mime_type',
            ],
        ],
        'folder',
    ];```

I've tried changing `name` to `fake_filename` and `entry.fake_filename` , but then I'm getting `Call to a member function getQuery() on null`

Any ideas?

ryanthompson - 1 year ago

You can bind the table class and set your own filters.

fryiee - 11 months ago

@dncl123 you can also use events to override it: http://craigberry.co/2018/02/22/extending-core-addons-via-events/