Pārlūkot izejas kodu

try to include footer content only when footerContent key is set

master
Dominik Schmidt-Philipp pirms 4 dienas
vecāks
revīzija
b036b727b2
1 mainītis faili ar 16 papildinājumiem un 11 dzēšanām
  1. +16
    -11
      app/controller/page.php

+ 16
- 11
app/controller/page.php Parādīt failu

@@ -22,17 +22,22 @@ class Page {
'templateContent'=>'maincontent.html'
));
self::folder2();
$footer = new \Modules\FilesInFolders(
$f3->get('CONTENT')."footer/",
array('content'=>array(
'secondary'=>'secondary',
'zzz'=>'hidden',
'unpublish'=>'hidden'
))
);
$footer->prepare_files();
$footer->fill_content();
$f3->set('footer_content', implode("\n", $footer->content['default']));
$footer_content = $f3->get('footerContent') ? : false;
if ($footer_content) {
$footer = new \Modules\FilesInFolders(
$f3->get('CONTENT')."footer/",
array('content'=>array(
'secondary'=>'secondary',
'zzz'=>'hidden',
'unpublish'=>'hidden'
))
);
$footer->prepare_files();
$footer->fill_content();
$f3->set('footer_content', implode("\n", $footer->content['default']));
} else {
$f3->set('footer_content', "");
}
break;
}
}

Notiek ielāde…
Atcelt
Saglabāt