From 8c0c5269c4981003a7bf8a106d4af36a3d525654 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Mon, 16 Dec 2013 23:38:31 +0100 Subject: [PATCH] Fixed 404 pages --- src/Views/top-navigation.phtml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Views/top-navigation.phtml b/src/Views/top-navigation.phtml index fa52ab80..bfd4a330 100644 --- a/src/Views/top-navigation.phtml +++ b/src/Views/top-navigation.phtml @@ -2,8 +2,16 @@ context->route->simpleControllerName; - $activeAction = $this->context->route->simpleActionName; + if ($this->context->route) + { + $activeController = $this->context->route->simpleControllerName; + $activeAction = $this->context->route->simpleActionName; + } + else + { + $activeController = null; + $activeAction = null; + } $registerNavItem = function ($text, $link, $active = false) use (&$nav) {