[9.1.00] Position du menu en barre latérale.

This commit is contained in:
fredtempez 2019-05-03 22:06:15 +02:00
parent 7297e0fa24
commit a808dadd53
3 changed files with 31 additions and 30 deletions

View File

@ -1817,18 +1817,43 @@ class layout extends common {
/**
* Affiche le contenu de la barre gauche
* @param page chargée
*
*/
public function showBarContentLeft() {
echo $this->core->output['contentLeft'];
// Détermine si le menu est présent
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'none') {
// Pas de menu
echo $this->core->output['contentLeft'];
} else {
// $mark contient 0 le menu est positionné à la fin du contenu
$contentLeft = $this->core->output['contentLeft'];
$mark = strrpos($contentLeft,'[]') !== false ? strrpos($contentLeft,'[]') : strlen($contentLeft);
echo substr($contentLeft,0,$mark);
echo '<div id="menuSideLeft>';
echo $this->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'parents' ? false : true);
echo '</div>';
echo substr($contentLeft,$mark+2,strlen($contentLeft));
}
}
/**
* Affiche le contenu de la barre droite
* @param page chargée
*/
public function showBarContentRight() {
echo $this->core->output['contentRight'];
// Détermine si le menu est présent
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) === 'none') {
// Pas de menu
echo $this->core->output['contentRight'];
} else {
// $mark contient 0 le menu est positionné à la fin du contenu
$contentRight = $this->core->output['contentRight'];
$mark = strrpos($contentRight,'[]') !== false ? strrpos($contentRight,'[]') : strlen($contentRight);
echo substr($contentRight,0,$mark);
echo '<div id="menuSideRight>';
echo $this->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) === 'parents' ? false : true);
echo '</div>';
echo substr($contentRight,$mark+2,strlen($contentRight));
}
}
/**

View File

@ -169,19 +169,7 @@
<?php
if ($blockleft !== "") :?>
<div class="<?php echo $blockleft; ?>" id="contentLeft">
<?php
// Détermine si le bloc a un menu à inclure
$layout->showBarContentLeft();
// Type de menu affiché
// 0 : aucun
// 1 : menu complet
// 2 : sous-menu de la page parente
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) !== 'none') {
?> <div id="menuSideLeft"><?php
$layout->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'parents' ? false : true);
?></div><?php
}
?>
<?php $layout->showBarContentLeft(); ?>
</div>
<?php endif; ?>
<div class="<?php echo $content; ?>
@ -190,19 +178,7 @@
<?php
if ($blockright !== "") :?>
<div class="<?php echo $blockright; ?>" id="contentRight">
<?php
// Détermine si le bloc a un menu à inclure
$layout->showBarContentRight();
// Type de menu affiché
// 0 : aucun
// 1 : menu complet
// 2 : sous-menu de la page parente
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) !== 'none') {
?> <div id="menuSideRight"><?php
$layout->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'displayMenu']) === 'parents' ? false : true);
?></div><?php
}
?>
<?php $layout->showBarContentRight(); ?>
</div>
<?php endif; ?>
</div>

BIN
sitemap.xml.gz Normal file

Binary file not shown.