Browse Source

CEpages: automatically add anchors

dev01
Dom SP 3 years ago
parent
commit
92def6efa4
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      app/modules/filesinfolders.php

+ 3
- 1
app/modules/filesinfolders.php View File

$target = array_shift($request); $target = array_shift($request);
$class = array_shift($request); $class = array_shift($request);
$folder = $this->folder.$target."/"; $folder = $this->folder.$target."/";
$anchor_name=array_pop(explode("/",$target));
$fff = new \Modules\FilesInFolders( $fff = new \Modules\FilesInFolders(
$folder, $folder,
array( array(
); );
$fff->prepare_files(); $fff->prepare_files();
$fff->fill_content(); $fff->fill_content();
$new = sprintf("<div class=\"content_element_page %s\">\n%s\n</div>",
$new = sprintf("<div class=\"content_element_page %s\"><a name=\"%s\"></a>\n%s\n</div>",
$class, $class,
$anchor_name,
implode("\n",$fff->content['default'])); implode("\n",$fff->content['default']));
break; break;

Loading…
Cancel
Save