From a412167c8acda86bea4df6b1be3e5beb24f72542 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Danny=20Nadeau=C3=A7?= Date: Sat, 28 Apr 2018 10:11:17 -0400 Subject: [PATCH] Add breadcrump item css class --- src/View/Helper/BreadcrumbHelper.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/View/Helper/BreadcrumbHelper.php b/src/View/Helper/BreadcrumbHelper.php index 313dcd2..b29be68 100644 --- a/src/View/Helper/BreadcrumbHelper.php +++ b/src/View/Helper/BreadcrumbHelper.php @@ -9,6 +9,7 @@ public function display($breadcrumbs=[],$options = []) { $options = array_merge([ 'container' => "ol", // tag name of container 'class' => "breadcrumb", // class name of container + 'class-item' => "breadcrumb-item", // class name of container 'element' => "li", // tag name of element 'active' => "active" // active class name of element ], $options); @@ -19,7 +20,7 @@ public function display($breadcrumbs=[],$options = []) { $index = 0; foreach($breadcrumbs as $breadcrumb) { $active = $breadcrumb['active']?$options['active']:''; - $html .= '<'.$options['element'].' class="'.$active.'">'; + $html .= '<'.$options['element'].' class="'.$active.' '.$options['class-item'].'">'; if($index == 0) { $html .= ' '; }