Problème dans la présenation des tableaux en mono page

This commit is contained in:
fredtempez 2019-01-16 20:30:30 +01:00
parent 3824c1c6f2
commit 5f9856defe

View File

@ -32,7 +32,6 @@
<?php endif; ?> <?php endif; ?>
<?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?> <?php if($this->getData(['theme', 'header', 'position']) === 'body'): ?>
<!-- Bannière dans le fond du site --> <!-- Bannière dans le fond du site -->
<?php <?php
if ($this->getData(['theme','header','linkHome'])){ if ($this->getData(['theme','header','linkHome'])){
echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?> echo "<a href='" . helper::baseUrl(false) . "'>" ;} ?>
@ -116,14 +115,14 @@
</nav> </nav>
<?php endif; ?> <?php endif; ?>
<?php <?php
// multi-colonnes // Gabarit :
// Récupérer la config de la page courante // Récupérer la config de la page courante
$blocks = explode('-',$this->getData(['page',$this->getUrl(0),'blocks'])); $blocks = explode('-',$this->getData(['page',$this->getUrl(0),'blocks']));
// Initialiser // Initialiser
$blockleft=$blockright=""; $blockleft=$blockright="";
switch (sizeof($blocks)) { switch (sizeof($blocks)) {
case 1 : // une colonne case 1 : // une colonne
$content = 'col'. $blocks[0] ; $content = 'col'. $blocks[0] ;
break; break;
case 2 : // 2 blocks case 2 : // 2 blocks
if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne
@ -138,15 +137,19 @@
$blockleft = 'col' . $blocks[0]; $blockleft = 'col' . $blocks[0];
$content = 'col' . $blocks[1]; $content = 'col' . $blocks[1];
$blockright = 'col' . $blocks[2]; $blockright = 'col' . $blocks[2];
} }
?>
<section> if (sizeof($blocks) === 1 ) {
?><section><?php $layout->showContent();?></section><?php
} else {
?>
<div class="row"> <div class="row">
<?php if ($blockleft !== "") :?> <div class="<?php echo $blockleft; ?>" id="contentleft"><?php echo $this->getData(['page','blockLeft','content']);?></div> <?php endif; ?> <?php if ($blockleft !== "") :?> <div class="<?php echo $blockleft; ?>" id="contentleft"><?php echo $this->getData(['page','blockLeft','content']);?></div> <?php endif; ?>
<div class="<?php echo $content; ?>" id="contentsite"><?php $layout->showContent(); ?></div> <div class="<?php echo $content; ?>" id="contentsite"><?php $layout->showContent(); ?></div>
<?php if ($blockright !== "") :?> <div class="<?php echo $blockright; ?>" id="contentright"><?php echo $this->getData(['page','blockRight','content']);?></div> <?php endif; ?> <?php if ($blockright !== "") :?> <div class="<?php echo $blockright; ?>" id="contentright"><?php echo $this->getData(['page','blockRight','content']);?></div> <?php endif; ?>
</div> </div></section>
</section> <?php } ?>
<!-- footer --> <!-- footer -->
<?php if( <?php if(
$this->getData(['theme', 'footer', 'position']) === 'site' $this->getData(['theme', 'footer', 'position']) === 'site'