Browse Source

updated default app template

tags/2.0.0-alpha
Alexander Makarov 12 years ago
parent
commit
90b2a54f2d
  1. 8
      framework/console/webapp/default/index.php
  2. 4
      framework/console/webapp/default/protected/config/main.php
  3. 7
      framework/console/webapp/default/protected/views/layouts/main.php

8
framework/console/webapp/default/index.php

@ -1,10 +1,10 @@
<?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();

4
framework/console/webapp/default/protected/config/main.php

@ -1,5 +1,6 @@
<?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(
'password' => '', 'password' => '',
), ),
*/ */
'cache' => array(
'class' => 'yii\caching\DummyCache',
),
), ),
); );

7
framework/console/webapp/default/protected/views/layouts/main.php

@ -1,11 +1,12 @@
<?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>

Loading…
Cancel
Save