barre_menu_position

This commit is contained in:
fredtempez 2019-05-03 15:28:04 +02:00
parent a75d3af0ce
commit aa46570acb
2 changed files with 21 additions and 19 deletions

View File

@ -1820,7 +1820,23 @@ class layout extends common {
* @param page chargée
*/
public function showBarContentLeft() {
echo $this->core->output['contentLeft'];
// Position du marqueur
if ($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'none') {
// Pas de menu
echo $this->core->output['contentLeft'];
} else {
// On recherche la position du menu
$mark = strpos('[]',$this->core->output['contentLeft']);
// pas de marqueur menu après le texte
if ($mark === 0 ) {
echo $this->core->output['contentLeft'];
echo '<div id="menuSideLeft>' . $this->showMenuSide($this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'displayMenu']) === 'parents' ? false : true) .'</div>';
} else {
// Placer le menu autour du texte
}
}
}
/**

View File

@ -169,21 +169,10 @@
<?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; ?>
<?php endif; die();?>
<div class="<?php echo $content; ?>
" id="contentSite"><?php $layout->showContent(); ?>
</div>
@ -193,10 +182,7 @@
<?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);