Skip to content

Commit

Permalink
Child Templates html directory
Browse files Browse the repository at this point in the history
when creating a child template it is incorrectly creating the html directory as a subdirectory of media - it should be /templates/childname/html
  • Loading branch information
brianteeman committed Oct 17, 2022
1 parent 8f684f1 commit 419049c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,9 @@ public function child()
}
}

// Create the html folder
Folder::create($toPath . '/html');

// Copy the template definition from the parent template
if (!File::copy($fromPath, $toPath . '/templateDetails.xml')) {
return false;
Expand Down Expand Up @@ -1932,6 +1935,7 @@ public function child()

$files = $xml->addChild('files');
$files->addChild('filename', 'templateDetails.xml');
$files->addChild('folder','html');

// Media folder
$media = $xml->addChild('media');
Expand All @@ -1940,7 +1944,6 @@ public function child()
$media->addChild('folder', 'css');
$media->addChild('folder', 'js');
$media->addChild('folder', 'images');
$media->addChild('folder', 'html');
$media->addChild('folder', 'scss');

$xml->name = $template->element . '_' . $newName;
Expand All @@ -1966,7 +1969,6 @@ public function child()
|| !Folder::create($toPath . '/media/css')
|| !Folder::create($toPath . '/media/js')
|| !Folder::create($toPath . '/media/images')
|| !Folder::create($toPath . '/media/html/tinymce')
|| !Folder::create($toPath . '/media/scss')
) {
return false;
Expand Down

0 comments on commit 419049c

Please sign in to comment.