home command now loads its template into the master template
[shipsimu.git] / inc / classes / main / commands / local / class_LocalHomeCommand.php
index c670cb1de84af66c2ac21f3849b348cc5712ed0d..02f0928f844b7e9e7376d59e6437b0330337ceda 100644 (file)
@@ -78,11 +78,23 @@ class LocalHomeCommand extends BaseCommand implements Commandable {
                // Load the master template
                $masterTemplate = $appInstance->getMasterTemplate();
 
+               // Load the home template
+               $templateInstance->loadWebTemplate("home");
+
+               // Assign the home template with the master template as a content ... ;)
+               $templateInstance->assignTemplateWithVariable("home", "content");
+
                // Load the master template
                $templateInstance->loadCodeTemplate($masterTemplate);
 
-               // Load the home template
-               $templateInstance->loadWebTemplate("home");
+               // Compile it...
+               $templateInstance->compileTemplate();
+
+               // ... and all variables. This should be merged together in a pattern
+               // to make things easier. A cache mechanism should be added between
+               // these two calls to cache compiled templates.
+               $templateInstance->compileVariables();
+               die("<pre>".print_r($templateInstance, true)."</pre>");
        }
 }