From b5c43b80b507591490283bca875c36c0cd37e0cd Mon Sep 17 00:00:00 2001 From: Andrew E Date: Fri, 28 Apr 2017 00:52:01 -0700 Subject: [PATCH 1/2] Updated is_current_path to support URL Segment Data --- src/TwigExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TwigExtension.php b/src/TwigExtension.php index 43df113..9b2f12e 100644 --- a/src/TwigExtension.php +++ b/src/TwigExtension.php @@ -55,9 +55,9 @@ public function baseUrl() } } - public function isCurrentPath($name) + public function isCurrentPath($name, $data = []) { - return $this->router->pathFor($name) === $this->uri->getPath(); + return $this->router->pathFor($name, $data) === $this->uri->getPath(); } /** From 929b073a8580e7952318333af52d8280d9d8d638 Mon Sep 17 00:00:00 2001 From: Andrew E Date: Fri, 28 Apr 2017 00:54:38 -0700 Subject: [PATCH 2/2] Updated README --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 485e92b..02c41f5 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,8 @@ This component exposes a custom `path_for()` function to your Twig templates. Yo {% block body %}

User List

{% endblock %}