Skip to content

Commit

Permalink
Added custom link class option for NAV_LIST_UL
Browse files Browse the repository at this point in the history
  • Loading branch information
slackero committed Aug 18, 2017
1 parent 25908d5 commit 520ae3e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion include/config/conf.template_default.inc.php
Expand Up @@ -329,7 +329,8 @@
'navlist-asub_no' => 'asub_no',
'navlist-asub_first' => 'asub_first',
'navlist-asub_last' => 'asub_last',
'navlist-navLevel' => 'navLevel-',
'navlist-link-class' => 'nav-link',
'navlist-navLevel' => 'nav-level-',
'navlist-bs-dropdown' => 'dropdown',
'navlist-bs-dropdown-toggle' => 'dropdown-toggle',
'breadcrumb-active' => 'active',
Expand Down
5 changes: 4 additions & 1 deletion include/inc_front/front.func.inc.php
Expand Up @@ -3098,7 +3098,10 @@ class_active_li|class_active_a,
}

$li_a_title = html_specialchars($GLOBALS['content']['struct'][$key]['acat_name']);
$li_a_class = ($active_class[1] && $key == $GLOBALS['aktion'][0]) ? $active_class[1] : ''; // set active link class
$li_a_class = $GLOBALS['template_default']['attributes']['navlist-link-class'];
if($active_class[1] && $key == $GLOBALS['aktion'][0]) {
$li_a_class = trim($li_a_class . ' ' . $active_class[1]); // set active link class
}
if($bs_toggle) {
$li_a_class = trim($GLOBALS['template_default']['classes']['navlist-bs-dropdown-toggle'].' '.$li_a_class);
$bs_data_toggle = ' '.$GLOBALS['template_default']['attributes']['navlist-bs-dropdown-data'];
Expand Down
3 changes: 2 additions & 1 deletion include/inc_lib/default.inc.php
Expand Up @@ -342,7 +342,8 @@ function mb_convert_encoding($string='', $out_charset='utf-8', $in_charset='utf-
'navlist-asub_no' => 'asub_no',
'navlist-asub_first' => 'asub_first',
'navlist-asub_last' => 'asub_last',
'navlist-navLevel' => 'navLevel-',
'navlist-link-class' => 'nav-link',
'navlist-navLevel' => 'nav-level-',
'navlist-bs-dropdown' => 'dropdown',
'navlist-bs-dropdown-toggle' => 'dropdown-toggle',
'breadcrumb-active' => 'active',
Expand Down

0 comments on commit 520ae3e

Please sign in to comment.