Skip to content

Commit ab78a3d

Browse files
author
Mikaël Capelle
committed
Correct options of the navbar.
1 parent d23ed52 commit ab78a3d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/View/Helper/BootstrapNavbarHelper.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,19 @@ public function create($brand, $options = []) {
9090
$options['inverse']);
9191

9292
/** Generate options for outer div. **/
93-
$options = $this->addClass($options, 'navbar navbar-default');
93+
$options = $this->addClass($options, 'navbar');
94+
if ($this->_inverse) {
95+
$options = $this->addClass($options , 'navbar-inverse');
96+
}
97+
else {
98+
$options = $this->addClass($options , 'navbar-default');
99+
}
94100
if ($this->_fixed !== false) {
95101
$options = $this->addClass($options, 'navbar-fixed-'.$this->_fixed);
96102
}
97103
else if ($this->_static !== false) {
98104
$options = $this->addClass($options, 'navbar-static-top');
99105
}
100-
if ($this->_inverse !== false) {
101-
$options = $this->addClass($options , 'navbar-inverse');
102-
}
103106

104107
$toggleButton = '';
105108
$rightOpen = '';

0 commit comments

Comments
 (0)