diff --git a/htdocs/core/class/html.formwebsite.class.php b/htdocs/core/class/html.formwebsite.class.php index 9bc9d5fe8e1..f2ac69198f6 100644 --- a/htdocs/core/class/html.formwebsite.class.php +++ b/htdocs/core/class/html.formwebsite.class.php @@ -349,6 +349,7 @@ class FormWebsite * * @param string $htmlContent HTML name of WYSIWYG field * @return string HTML for model page boxes + * @see getEmailLayoutSelector() */ public function getContentPageTemplate($htmlContent = 'message') { @@ -359,8 +360,12 @@ class FormWebsite require_once DOL_DOCUMENT_ROOT.'/core/lib/emaillayout.lib.php'; $listofsamples = dol_dir_list(DOL_DOCUMENT_ROOT.'/website/samples', 'files', 0, '^page-sample-.*\.html$'); - $arrayofsamples = array(); - $arrayofsamples['empty'] = 'EmptyPage'; // Always this one first + + // Define list of layouts to use + $arrayofsamples = array( + 'empty' => 'EmptyPage', + ); + foreach ($listofsamples as $sample) { $reg = array(); if (preg_match('/^page-sample-(.*)\.html$/', $sample['name'], $reg)) { @@ -391,7 +396,7 @@ class FormWebsite $contentHtml = file_exists($pathtoTemplateFile) ? make_substitutions(@file_get_contents($pathtoTemplateFile), $substitutionarray) : ''; $out .= '
';
+ $out .= '
';
$out .= ''.($template != 'text' ? ucfirst($template) : ucfirst($templateFunction)).'';
$out .= '