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

@@ -762,19 +762,28 @@ class FilesInFolders {
$anchor_name=array_pop(explode("/",$target));
$fff = new \Modules\FilesInFolders(
$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->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;

Loading…
Cancel
Save