Basic for for #262

Signed-off-by: James Cole <thegrumpydictator@gmail.com>
This commit is contained in:
James Cole
2016-05-22 21:11:30 +02:00
parent 288e713f94
commit a447c886c4
4 changed files with 100 additions and 1 deletions

View File

@@ -87,7 +87,8 @@ class General extends Twig_Extension
'activeRoutePartial', function () : string {
$args = func_get_args();
$route = $args[0]; // name of the route.
if (!(strpos(Route::getCurrentRoute()->getName(), $route) === false)) {
$name = Route::getCurrentRoute()->getName() ?? '';
if (!(strpos($name, $route) === false)) {
return 'active';
}