données des blocs dans config plutôt que theme

This commit is contained in:
fredtempez 2019-01-03 15:07:11 +01:00
parent e0e683f890
commit d90bfd0253
3 changed files with 13 additions and 10 deletions

View File

@ -56,7 +56,9 @@ class common {
],
'timezone' => 'Europe/Paris',
'title' => 'Zwii, votre site en quelques clics !',
'itemsperPage' => 10
'itemsperPage' => 10,
'contenLeft' => '',
'contentRight' => ''
],
'core' => [
'dataVersion' => 0,
@ -996,8 +998,8 @@ class common {
// Version 9.0.0
if($this->getData(['core', 'dataVersion']) < 900) {
$this->setData(['theme', 'site', 'blocks','100']);
$this->setData(['theme', 'site', 'contentLeft','']);
$this->setData(['theme', 'site', 'contentRight','']);
$this->setData(['config', 'contentLeft','']);
$this->setData(['config', 'contentRight','']);
$this->setData(['core', 'dataVersion', 900]);
$this->SaveData();
}

View File

@ -435,9 +435,10 @@ class theme extends common {
'shadow' => $this->getInput('themeSiteShadow'),
'width' => $this->getInput('themeSiteWidth'),
'blocks' => $this->getInput('themeSiteBlocks'),
'contentLeft' => (empty($this->getInput('themeSiteContentleft', null)) ? "<p></p>" : $this->getInput('themeSiteContentleft', null)),
'contentRight' => (empty($this->getInput('themeSiteContentright', null)) ? "<p></p>" : $this->getInput('themeSiteContentright', null))
]]);
$this->setData(['config', [
'contentLeft' => (empty($this->getInput('configContentleft', null)) ? "<p></p>" : $this->getInput('configContentleft', null)),
'contentRight' => (empty($this->getInput('configContentright', null)) ? "<p></p>" : $this->getInput('configContentright', null))
]]);
// Valeurs en sortie
$this->addOutput([

View File

@ -144,15 +144,15 @@
</div>
<div class='row'>
<div class="col6">
<?php echo template::textarea('themeSiteContentright', [
<?php echo template::textarea('configContentright', [
'class' => 'editorWysiwyg',
'value' => $this->getData(['theme', 'site', 'contentRight'])
'value' => $this->getData(['config', 'contentRight'])
]); ?>
</div>
<div class="col6">
<?php echo template::textarea('themeSiteContentleft', [
<?php echo template::textarea('configContentleft', [
'class' => 'editorWysiwyg',
'value' => $this->getData(['theme', 'site', 'contentLeft'])
'value' => $this->getData(['config', 'contentLeft'])
]); ?>
</div>
</div>