forked from ZwiiCMS-Team/ZwiiCMS
[9.2.15] Affichage d'une page Lity sans la structure du site (manue, bannière, footer)
This commit is contained in:
parent
4504eb8662
commit
f2c01e7e9f
@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## version 9.2.15
|
||||||
|
- Amélioration :
|
||||||
|
- Affichage du contenu seul d'une page du site dans une popup Lity sans menu, bannière et pied de page
|
||||||
|
|
||||||
## version 9.2.14
|
## version 9.2.14
|
||||||
- Mise à jour :
|
- Mise à jour :
|
||||||
- Script d'upload du gestionnaire de fichiers
|
- Script d'upload du gestionnaire de fichiers
|
||||||
|
@ -21,6 +21,7 @@ class common {
|
|||||||
const DISPLAY_LAYOUT_BLANK = 2;
|
const DISPLAY_LAYOUT_BLANK = 2;
|
||||||
const DISPLAY_LAYOUT_MAIN = 3;
|
const DISPLAY_LAYOUT_MAIN = 3;
|
||||||
const DISPLAY_LAYOUT_LIGHT = 4;
|
const DISPLAY_LAYOUT_LIGHT = 4;
|
||||||
|
const DISPLAY_LAYOUT_POPUP = 5;
|
||||||
const GROUP_BANNED = -1;
|
const GROUP_BANNED = -1;
|
||||||
const GROUP_VISITOR = 0;
|
const GROUP_VISITOR = 0;
|
||||||
const GROUP_MEMBER = 1;
|
const GROUP_MEMBER = 1;
|
||||||
@ -69,6 +70,7 @@ class common {
|
|||||||
'notification' => '',
|
'notification' => '',
|
||||||
'redirect' => '',
|
'redirect' => '',
|
||||||
'script' => '',
|
'script' => '',
|
||||||
|
'targetLity' => false,
|
||||||
'showBarEditButton' => false,
|
'showBarEditButton' => false,
|
||||||
'showPageContent' => false,
|
'showPageContent' => false,
|
||||||
'state' => false,
|
'state' => false,
|
||||||
@ -1302,7 +1304,8 @@ class core extends common {
|
|||||||
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
|
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
|
||||||
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
|
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
|
||||||
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
|
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
|
||||||
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content'])
|
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']),
|
||||||
|
'targetLity' => is_null($this->getData(['page', $this->getUrl(0), 'targetLity'])) ? false : $this->getData(['page', $this->getUrl(0), 'targetLity'])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Importe le module
|
// Importe le module
|
||||||
@ -1319,7 +1322,8 @@ class core extends common {
|
|||||||
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
|
'iconUrl' => $this->getData(['page', $this->getUrl(0), 'iconUrl']),
|
||||||
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
|
'disable' => $this->getData(['page', $this->getUrl(0), 'disable']),
|
||||||
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
|
'contentRight' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barRight']),'content']),
|
||||||
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content'])
|
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']),
|
||||||
|
'targetLity' => is_null($this->getData(['page', $this->getUrl(0), 'targetLity'])) ? false : $this->getData(['page', $this->getUrl(0), 'targetLity'])
|
||||||
]);
|
]);
|
||||||
$pageContent = $this->getData(['page', $this->getUrl(0), 'content']);
|
$pageContent = $this->getData(['page', $this->getUrl(0), 'content']);
|
||||||
}
|
}
|
||||||
@ -1523,7 +1527,10 @@ class core extends common {
|
|||||||
'metaDescription' => $this->getData(['config', 'metaDescription'])
|
'metaDescription' => $this->getData(['config', 'metaDescription'])
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
// Choix du type d'affichage
|
|
||||||
|
if($this->output['targetLity']) {
|
||||||
|
require 'core/layout/popup.php';
|
||||||
|
} else {
|
||||||
switch($this->output['display']) {
|
switch($this->output['display']) {
|
||||||
// Layout vide
|
// Layout vide
|
||||||
case self::DISPLAY_LAYOUT_BLANK:
|
case self::DISPLAY_LAYOUT_BLANK:
|
||||||
@ -1541,6 +1548,10 @@ class core extends common {
|
|||||||
// Layout principal
|
// Layout principal
|
||||||
case self::DISPLAY_LAYOUT_MAIN:
|
case self::DISPLAY_LAYOUT_MAIN:
|
||||||
require 'core/layout/main.php';
|
require 'core/layout/main.php';
|
||||||
|
break;
|
||||||
|
// Layout poup lity
|
||||||
|
case self::DISPLAY_LAYOUT_POPUP:
|
||||||
|
|
||||||
break;
|
break;
|
||||||
// Layout brut
|
// Layout brut
|
||||||
case self::DISPLAY_RAW:
|
case self::DISPLAY_RAW:
|
||||||
@ -1548,6 +1559,7 @@ class core extends common {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
83
core/layout/popup.php
Normal file
83
core/layout/popup.php
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
<?php $layout = new layout($this); ?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html prefix="og: http://ogp.me/ns#" lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<?php $layout->showMetaTitle(); ?>
|
||||||
|
<?php $layout->showMetaDescription(); ?>
|
||||||
|
<?php $layout->showMetaType(); ?>
|
||||||
|
<?php $layout->showMetaImage(); ?>
|
||||||
|
<?php $layout->showFavicon(); ?>
|
||||||
|
<?php $layout->showVendor(); ?>
|
||||||
|
<?php $layout->showAnalytics(); ?>
|
||||||
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>core/layout/common.css">
|
||||||
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/theme.css?<?php echo md5_file(self::DATA_DIR.'theme.css'); ?>">
|
||||||
|
<link rel="stylesheet" href="<?php echo helper::baseUrl(false); ?>site/data/custom.css?<?php echo md5_file(self::DATA_DIR.'custom.css'); ?>">
|
||||||
|
<?php $layout->showStyle(); ?>
|
||||||
|
<?php if (file_exists('site/data/head.inc.html')) {
|
||||||
|
include('site/data/head.inc.html');
|
||||||
|
}?>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!-- Corps de page -->
|
||||||
|
<section>
|
||||||
|
<?php
|
||||||
|
// Gabarit :
|
||||||
|
// Récupérer la config de la page courante
|
||||||
|
$blocks = explode('-',$this->getData(['page',$this->getUrl(0),'block']));
|
||||||
|
// Initialiser
|
||||||
|
$blockleft=$blockright="";
|
||||||
|
switch (sizeof($blocks)) {
|
||||||
|
case 1 : // une colonne
|
||||||
|
$content = 'col'. $blocks[0] ;
|
||||||
|
break;
|
||||||
|
case 2 : // 2 blocks
|
||||||
|
if ($blocks[0] < $blocks[1]) { // détermine la position de la colonne
|
||||||
|
$blockleft = 'col'. $blocks[0];
|
||||||
|
$content = 'col'. $blocks[1] ;
|
||||||
|
} else {
|
||||||
|
$content = 'col' . $blocks[0];
|
||||||
|
$blockright = 'col' . $blocks[1];
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case 3 : // 3 blocks
|
||||||
|
$blockleft = 'col' . $blocks[0];
|
||||||
|
$content = 'col' . $blocks[1];
|
||||||
|
$blockright = 'col' . $blocks[2];
|
||||||
|
}
|
||||||
|
// Page pleine pour la configuration des modules et l'édition des pages sauf l'affichae d'un article de blog
|
||||||
|
$pattern = ['config','edit','add','comment','data'];
|
||||||
|
if ((sizeof($blocks) === 1 ||
|
||||||
|
in_array($this->getUrl(1),$pattern) )
|
||||||
|
) { // Pleine page en mode configuration
|
||||||
|
$layout->showContent();
|
||||||
|
if (file_exists('site/data/body.inc.html')) {
|
||||||
|
include('site/data/body.inc.html');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
?>
|
||||||
|
<div class="row siteContainer">
|
||||||
|
<?php
|
||||||
|
if ($blockleft !== "") :?>
|
||||||
|
<div class="<?php echo $blockleft; ?>" id="contentLeft"><?php $layout->showBarContentLeft(); ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
<div class="<?php echo $content; ?>" id="contentSite"><?php $layout->showContent();
|
||||||
|
if (file_exists('site/data/body.inc.html')) {
|
||||||
|
include('site/data/body.inc.html');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
if ($blockright !== "") :?>
|
||||||
|
<div class="<?php echo $blockright; ?>" id="contentRight"><?php $layout->showBarContentRight(); ?></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
<?php }
|
||||||
|
?>
|
||||||
|
</section>
|
||||||
|
<!-- Lien remonter en haut -->
|
||||||
|
<div id="backToTop"><?php echo template::ico('up'); ?></div>
|
||||||
|
<?php $layout->showScript();?>
|
||||||
|
</body>
|
||||||
|
</html>
|
Loading…
Reference in New Issue
Block a user