X-Git-Url: https://git.mxchange.org/?p=shipsimu.git;a=blobdiff_plain;f=inc%2Fclasses%2Fmain%2Fcommands%2Flocal%2Fclass_LocalHomeCommand.php;h=24ef746cf96f7a79e7d79f4d9ec94b510526cd9b;hp=c670cb1de84af66c2ac21f3849b348cc5712ed0d;hb=363af5d51040c7abb8d6a0f31882a57eacf4a930;hpb=b912eda46059527fc0475e043944c3ebff47fbcd diff --git a/inc/classes/main/commands/local/class_LocalHomeCommand.php b/inc/classes/main/commands/local/class_LocalHomeCommand.php index c670cb1..24ef746 100644 --- a/inc/classes/main/commands/local/class_LocalHomeCommand.php +++ b/inc/classes/main/commands/local/class_LocalHomeCommand.php @@ -78,11 +78,25 @@ 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(); + + // Get the content back from the template engine and put it in the response class + $templateInstance->transferToResponse($responseInstance); } }