This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.
Johanness
Sometimes the same static redirect URL for list rows is too restricting.
e.g.
with morphOne the rowLinkURL would need to be Acme/MyPlugin/MyClass/update/:linkable_id
whereas linkable_type must be Acme/MyPlugin/Models/MyClass
.
If we could have an Event for List->getRecordUrl we just would need this in our controller:
public function listOverrideRowUrl($record, $defaultUrl)
{
return 'Acme/MyPlugin/' . basename($record['linkable_type'] . '/update/' . $record['linkable_id'];
}
To achieve this I think one would need to insert a call to the event at the end of getRecordUrl in lists.php and bind it in listController makeList
Last updated
1-1 of 1