Lity page avec un module

This commit is contained in:
Fred Tempez 2021-03-30 09:49:33 +02:00
parent 27154982ec
commit 2d432a375a
1 changed files with 10 additions and 8 deletions

View File

@ -2102,12 +2102,6 @@ class core extends common {
'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content']) 'contentLeft' => $this->getData(['page',$this->getData(['page',$this->getUrl(0),'barLeft']),'content'])
]); ]);
$pageContent = $this->getData(['page', $this->getUrl(0), 'content']); $pageContent = $this->getData(['page', $this->getUrl(0), 'content']);
if ( $this->getData(['page', $this->getUrl(0), 'lity']) === true
&& $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$this->addOutput([
'display' => self::DISPLAY_LAYOUT_LITY
]);
}
} }
else { else {
$moduleId = $this->getUrl(0); $moduleId = $this->getUrl(0);
@ -2117,6 +2111,7 @@ class core extends common {
if(class_exists($moduleId)) { if(class_exists($moduleId)) {
/** @var common $module */ /** @var common $module */
$module = new $moduleId; $module = new $moduleId;
// Check l'existence de l'action // Check l'existence de l'action
$action = ''; $action = '';
$ignore = true; $ignore = true;
@ -2181,9 +2176,15 @@ class core extends common {
} }
// Données en sortie applicables même lorsqu'une notice est présente // Données en sortie applicables même lorsqu'une notice est présente
// Affichage // Affichage
if($output['display']) {
if ( $this->getData(['page', $this->getUrl(0), 'lity']) === true
&& $this->getUser('password') !== $this->getInput('ZWII_USER_PASSWORD') ) {
$this->addOutput([
'display' =>self::DISPLAY_LAYOUT_LITY
]);
} else {
$this->addOutput([ $this->addOutput([
'display' => $output['display'] 'display' =>self::DISPLAY_LAYOUT_MAIN
]); ]);
} }
// Contenu brut // Contenu brut
@ -2352,6 +2353,7 @@ class core extends common {
'metaDescription' => $this->getData(['locale', 'metaDescription']) 'metaDescription' => $this->getData(['locale', 'metaDescription'])
]); ]);
} }
switch($this->output['display']) { switch($this->output['display']) {
// Layout brut // Layout brut
case self::DISPLAY_RAW: case self::DISPLAY_RAW: