Thread tagged as: Problem, Api, Add-on-development

Custom ID parameter using PerchAdminListing


I'm in the process of upgrading a custom add-on to Perch 3 and I've hit a bit of a snag using the PerchAdminListing API. The app is built with a revision system that means that I need to link to a different key column rather than the primary key. It doesn't look like this is possible using the API as it always adds a reference to $row->id() regardless of the content.

I've tried to return a custom value using a callback:

'edit_link' => function($contract) {
    return 'edit/?id=' . $contract->vid();

But the result is: /edit/?id=2/?id=4

Is there a way around this without having to break out of using the API for the table? Running the latest Runway (3.0.9).

Also, I am guessing this will affect the add_delete_action method too.

James Wigger

James Wigger 0 points

  • 4 years ago