Skip to content

Commit

Permalink
Change _getHtml to append class rather than overwrite for children
Browse files Browse the repository at this point in the history
  • Loading branch information
jonshipman committed Jan 3, 2018
1 parent 9e5f7c4 commit 862e74a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/code/Magento/Theme/Block/Html/Topmenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,13 @@ protected function _getHtml(

if ($childLevel == 0 && $outermostClass) {
$outermostClassCode = ' class="' . $outermostClass . '" ';
$child->setClass($outermostClass);
$current_class = $child->getClass();

if (empty($current_class)) {
$child->setClass($outermostClass);
} else {
$child->setClass($current_class . ' ' . $outermostClass);
}
}

if (count($colBrakes) && $colBrakes[$counter]['colbrake']) {
Expand Down

0 comments on commit 862e74a

Please sign in to comment.