diff --git a/src/DefaultLink.php b/src/DefaultLink.php index 692320c..55b52d2 100644 --- a/src/DefaultLink.php +++ b/src/DefaultLink.php @@ -49,7 +49,10 @@ public function getModelLink($action, array $params = null) $dirParts = explode('/', $url); // replace the current action - array_pop($dirParts); + if (!is_numeric(end($dirParts))) { + array_pop($dirParts); + } + $dirParts[] = 'doCustomLink'; $action = implode('/', $dirParts);