Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Do not mark pages as active if there are query parameters (see #7189)
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed Sep 26, 2014
1 parent c3720ca commit 952eb4d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion contao/modules/Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ protected function renderNavigation($pid, $level=1, $host=null, $language=null)
$trail = in_array($objSubpages->id, $objPage->trail);

// Active page
if (($objPage->id == $objSubpages->id || $objSubpages->type == 'forward' && $objPage->id == $objSubpages->jumpTo) && !$this instanceof \ModuleSitemap && !\Input::get('articles'))
if (($objPage->id == $objSubpages->id || $objSubpages->type == 'forward' && $objPage->id == $objSubpages->jumpTo) && !$this instanceof \ModuleSitemap && $href == \Environment::get('request'))
{
// Mark active forward pages (see #4822)
$strClass = (($objSubpages->type == 'forward' && $objPage->id == $objSubpages->jumpTo) ? 'forward' . ($trail ? ' trail' : '') : 'active') . (($subitems != '') ? ' submenu' : '') . ($objSubpages->protected ? ' protected' : '') . (($objSubpages->cssClass != '') ? ' ' . $objSubpages->cssClass : '');
Expand Down
2 changes: 1 addition & 1 deletion contao/modules/ModuleCustomnav.php
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ protected function compile()
$trail = in_array($arrPage['id'], $objPage->trail);

// Active page
if ($objPage->id == $arrPage['id'])
if ($objPage->id == $arrPage['id'] && $href == \Environment::get('request'))
{
$strClass = trim($arrPage['cssClass']);
$row = $arrPage;
Expand Down

0 comments on commit 952eb4d

Please sign in to comment.