Sfoglia il codice sorgente

try to include footer content only when footerContent key is set

master
Dominik Schmidt-Philipp 4 giorni fa
parent
commit
b036b727b2
1 ha cambiato i file con 16 aggiunte e 11 eliminazioni
  1. +16
    -11
      app/controller/page.php

+ 16
- 11
app/controller/page.php Vedi File

@@ -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;
}
}

Loading…
Annulla
Salva