Commit 90b2a54f by Alexander Makarov

updated default app template

parent a701697c
<?php <?php
define('YII_DEBUG', true); define('YII_DEBUG', true);
$yii = __DIR__.'/../framework/yii.php'; require __DIR__.'/../framework/yii.php';
require $yii;
$config = require dirname(__DIR__).'/protected/config/main.php'; $config = require dirname(__DIR__).'/protected/config/main.php';
$config['basePath'] = dirname(__DIR__).'/protected';
$basePath = dirname(__DIR__).'/protected'; $app = new \yii\web\Application($config);
$app = new \yii\web\Application('webapp', $basePath, $config);
$app->run(); $app->run();
\ No newline at end of file
<?php <?php
return array( return array(
'id' => 'webapp',
'name' => 'My Web Application', 'name' => 'My Web Application',
'components' => array( 'components' => array(
...@@ -12,5 +13,8 @@ return array( ...@@ -12,5 +13,8 @@ return array(
'password' => '', 'password' => '',
), ),
*/ */
'cache' => array(
'class' => 'yii\caching\DummyCache',
),
), ),
); );
\ No newline at end of file
<?php use yii\helpers\Html as Html; ?>
<!doctype html> <!doctype html>
<html lang="en"> <html lang="<?php \Yii::$app->language?>">
<head> <head>
<meta charset="utf-8" /> <meta charset="utf-8" />
<title><?php echo $this->context->pageTitle?></title> <title><?php echo Html::encode($this->page->title)?></title>
</head> </head>
<body> <body>
<h1><?php echo $this->context->pageTitle?></h1> <h1><?php echo Html::encode($this->page->title)?></h1>
<div class="content"> <div class="content">
<?php echo $content?> <?php echo $content?>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment