Test homePageId

This commit is contained in:
fredtempez 2021-12-09 17:23:15 +01:00
parent 1cb73244f2
commit b593bf86fe
1 changed files with 9 additions and 5 deletions

View File

@ -1623,7 +1623,7 @@ class common {
$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
$itemsLeft .= '<li>'; $itemsLeft .= '<li>';
if ( ( $this->getData(['page',$parentPageId,'disable']) === true if ( ( $this->getData(['page',$parentPageId,'disable']) === true
AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') AND $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD')
) OR ( ) OR (
@ -1632,9 +1632,11 @@ class common {
AND $this->getUser('group') < self::GROUP_MODERATOR AND $this->getUser('group') < self::GROUP_MODERATOR
) )
){ ){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'. helper::baseUrl() . $this->getUrl(0).'">'; $pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
$itemsLeft .= '<a class="A ' . $parentPageId . '" href="' . $pageUrl . '">';
} else { } else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $parentPageId . '"' . $targetBlank . '>'; $pageUrl = ($this->getData(['locale', 'homePageId']) === $parentPageId) ? helper::baseUrl(false) : helper::baseUrl() . $parentPageId;
$itemsLeft .= '<a class="B ' . $active . $parentPageId . '" href="' . $pageUrl . '"' . $targetBlank . '>';
} }
switch ($this->getData(['page', $parentPageId, 'typeMenu'])) { switch ($this->getData(['page', $parentPageId, 'typeMenu'])) {
@ -1692,9 +1694,11 @@ class common {
AND $this->getUser('group') < self::GROUP_MODERATOR AND $this->getUser('group') < self::GROUP_MODERATOR
) )
){ ){
$itemsLeft .= '<a class="' . $parentPageId . '" href="'.helper::baseUrl() . $this->getUrl(0).'">'; $pageUrl = ($this->getData(['locale', 'homePageId']) === $this->getUrl(0)) ? helper::baseUrl(false) : helper::baseUrl() . $this->getUrl(0);
$itemsLeft .= '<a class="' . $parentPageId . '" href="'. $pageUrl .'">';
} else { } else {
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . helper::baseUrl() . $childKey . '"' . $targetBlank . '>'; $pageUrl = ($this->getData(['locale', 'homePageId']) === $childKey) ? helper::baseUrl(false) : helper::baseUrl() . $childKey;
$itemsLeft .= '<a class="' . $active . $parentPageId . '" href="' . $pageUrl . '"' . $targetBlank . '>';
} }
switch ($this->getData(['page', $childKey, 'typeMenu'])) { switch ($this->getData(['page', $childKey, 'typeMenu'])) {