bug classe active dans menu latéral

This commit is contained in:
Fred Tempez 2020-11-02 12:11:59 +01:00
parent 72d3bb772f
commit ca411cf9a1
1 changed files with 4 additions and 4 deletions

View File

@ -2530,7 +2530,7 @@ class layout extends common {
continue; continue;
} }
// Propriétés de l'item // Propriétés de l'item
$active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? 'active ' : ''; $active = ($parentPageId === $currentPageId OR in_array($currentPageId, $childrenPageIds)) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : ''; $targetBlank = $this->getData(['page', $parentPageId, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page de l'item; // Mise en page de l'item;
// Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée. // Ne pas afficher le parent d'une sous-page quand l'option est sélectionnée.
@ -2540,7 +2540,7 @@ class layout extends common {
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$items .= '<a href="'.$this->getUrl(1).'">'; $items .= '<a href="'.$this->getUrl(1).'">';
} else { } else {
$items .= '<a href="' . $active . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>'; $items .= '<a href="'. helper::baseUrl() . $parentPageId . '"' . $targetBlank . $active .'>';
} }
$items .= $this->getData(['page', $parentPageId, 'title']); $items .= $this->getData(['page', $parentPageId, 'title']);
$items .= '</a>'; $items .= '</a>';
@ -2553,7 +2553,7 @@ class layout extends common {
} }
// Propriétés de l'item // Propriétés de l'item
$active = ($childKey === $currentPageId) ? 'active ' : ''; $active = ($childKey === $currentPageId) ? ' class="active"' : '';
$targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : ''; $targetBlank = $this->getData(['page', $childKey, 'targetBlank']) ? ' target="_blank"' : '';
// Mise en page du sous-item // Mise en page du sous-item
$itemsChildren .= '<li class="menuSideChild">'; $itemsChildren .= '<li class="menuSideChild">';
@ -2562,7 +2562,7 @@ class layout extends common {
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) { AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$itemsChildren .= '<a href="'.$this->getUrl(1).'">'; $itemsChildren .= '<a href="'.$this->getUrl(1).'">';
} else { } else {
$itemsChildren .= '<a href="' .$active . helper::baseUrl() . $childKey . '"' . $targetBlank . '>'; $itemsChildren .= '<a href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . $active . '>';
} }
$itemsChildren .= $this->getData(['page', $childKey, 'title']); $itemsChildren .= $this->getData(['page', $childKey, 'title']);