From 9254782ad71d294bff1786d141fda5e650760884 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 7 Jan 2018 22:04:31 +0100 Subject: [PATCH] Fix init template of non page --- htdocs/website/index.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/website/index.php b/htdocs/website/index.php index 7d27badbc83..d11f2503add 100644 --- a/htdocs/website/index.php +++ b/htdocs/website/index.php @@ -524,7 +524,9 @@ if ($action == 'addcontainer') $substitutionarray=array(); $substitutionarray['__WEBSITE_CREATE_BY__']=$user->getFullName($langs); - $objectpage->content = make_substitutions(file_get_contents(DOL_DOCUMENT_ROOT.'/website/pagetemplate.html'), $substitutionarray); + + // Init content with content into pagetemplate.html, blogposttempltate.html, ... + $objectpage->content = make_substitutions(@file_get_contents(DOL_DOCUMENT_ROOT.'/website/'.$objectpage->type_container.'template.html'), $substitutionarray); } if (! $error)