]> git.mxchange.org Git - shipsimu.git/blobdiff - inc/classes/main/commands/local/class_LocalHomeCommand.php
Template inserts fixes
[shipsimu.git] / inc / classes / main / commands / local / class_LocalHomeCommand.php
index 033e1afc290ec5a738ccb8f6e34e81fd46886bdd..78d679943bb61ccecb39a32e56cb4d0312dbeadb 100644 (file)
@@ -78,6 +78,13 @@ class LocalHomeCommand extends BaseCommand implements Commandable {
                // Load the master template
                $masterTemplate = $appInstance->getMasterTemplate();
 
+               // Load header template
+               $templateInstance->loadCodeTemplate("header");
+
+               // Compile and assign it with a variable
+               $templateInstance->compileTemplate();
+               $templateInstance->assignTemplateWithVariable("header", "header");
+
                // Load the home template
                $templateInstance->loadWebTemplate("home");
 
@@ -87,9 +94,6 @@ class LocalHomeCommand extends BaseCommand implements Commandable {
                // Load the master template
                $templateInstance->loadCodeTemplate($masterTemplate);
 
-               // Compile it...
-               $templateInstance->compileTemplate();
-
                // Set title
                $title = ucfirst($requestInstance->getRequestElement($this->getConfigInstance()->readConfig("command_parameter")));
                if (empty($title)) $title = "Home";