theme service fix

This commit is contained in:
2025-01-24 15:00:22 +03:00
parent b1dacff877
commit fc70051761
123 changed files with 4 additions and 11741 deletions

View File

@ -1,28 +0,0 @@
<?php
namespace app\themes\custom\controllers;
use kernel\Controller;
class MainController extends Controller
{
protected function init(): void
{
parent::init();
$this->cgView->viewPath = APP_DIR . "/themes/custom/views/main/";
$this->cgView->layout = "main.php";
$this->cgView->layoutPath = APP_DIR . "/themes/custom/views/layout/";
$this->cgView->addVarToLayout("resources", "/resources/themes/custom");
}
public function actionIndex(): void
{
$this->cgView->render("index.php");
}
public function actionAbout(): void
{
$this->cgView->render("about.php");
}
}