20240502#1
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace App\Main\Controllers;
|
||||
use Base\Controllers\AbstractPageController;
|
||||
namespace App\Main\Presentation\Controllers;
|
||||
use Base\Presentation\Controllers\AbstractPageController;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ class IndexController extends AbstractPageController {
|
||||
try {
|
||||
//$this->addHeader("App-Mode", "Dev");
|
||||
$this->template()->setValue("title", "Главная");
|
||||
$this->template()->setSubtemplate("main", "/main/index.tpl", [
|
||||
$this->template()->setSubtemplate("main", "@main/index.tpl", [
|
||||
"date" => (new \DateTime())->format('Y-m-d H:i:s')
|
||||
]);
|
||||
}
|
||||
8
src/Main/Presentation/templates/index.tpl
Normal file
8
src/Main/Presentation/templates/index.tpl
Normal file
@@ -0,0 +1,8 @@
|
||||
<article>
|
||||
<main>
|
||||
<div class="main-block">
|
||||
<div class="main-block__header">Hello</div>
|
||||
<div class="main-block__text">Now is <?=$this->date?></div>
|
||||
</div>
|
||||
</main>
|
||||
</article>
|
||||
Reference in New Issue
Block a user