From ce2cf7b239876922df5bbb10587af044f5a205b0 Mon Sep 17 00:00:00 2001 From: biakaveron Date: Fri, 16 Aug 2013 10:28:44 +0400 Subject: [PATCH] Added more detailed information for current routes (implements #27) --- views/toolbar.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/views/toolbar.php b/views/toolbar.php index 6a3d70c..8e785e0 100644 --- a/views/toolbar.php +++ b/views/toolbar.php @@ -318,12 +318,34 @@ # name + directory + controller + action + params $route): - $class = ($route == Request::initial()->route() ? ' current' : ''); ?> + // Toolbar may render on shutdown, so Request::current() is empty + $request = Request::current() ? Request::current() : Request::initial(); + $current = $route == $request->route(); + $class = ($current ? ' current' : ''); ?> + + directory() ?> + controller() ?> + action() ?> + + + + + +   +