Browse Source

impropve: CE page now includes banner image, if available

master
Dom SP 3 years ago
parent
commit
08734c0135
1 changed files with 19 additions and 10 deletions
  1. +19
    -10
      app/modules/filesinfolders.php

+ 19
- 10
app/modules/filesinfolders.php View File

$anchor_name=array_pop(explode("/",$target)); $anchor_name=array_pop(explode("/",$target));
$fff = new \Modules\FilesInFolders( $fff = new \Modules\FilesInFolders(
$folder, $folder,
array(
'content'=>array(
'secondary'=>'secondary',
'zzz'=>'hidden',
'unpublish'=>'hidden'
))
['content'=>[
'secondary'=>'secondary',
'zzz'=>'hidden',
'unpublish'=>'hidden'],
'keyfiles'=>[
'banner'=>[
'until'=>$folder,
'type'=>'pic']]]
); );
$fff->prepare_files(); $fff->prepare_files();
$fff->fill_content(); $fff->fill_content();
$new = sprintf("<div class=\"content_element_page %s\"><a name=\"%s\"></a>\n%s\n</div>",
$class,
$anchor_name,
implode("\n",$fff->content['default']));
$banner = "";
if ($fff->extras['banner']) {
$banner=sprintf("<img class=\"banner\" src=\"%s\" alt=\"section banner\"/>",
$fff->extras['banner']);
}
$new = sprintf("<div class=\"content_element_page %s\">"
."<a name=\"%s\">%s</a>\n%s\n</div>",
$class,
$anchor_name,
$banner,
implode("\n",$fff->content['default']));
break; break;

Loading…
Cancel
Save