コード例 #1
0
ファイル: article.php プロジェクト: tqsq2005/blog-cms
<?php

/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
use app\models\Menu;
use app\models\Setting;
use app\models\Article;
use yii\helpers\Url;
AppAsset::register($this);
$menu = new Menu();
$tags = $menu->getTags();
$all = 0;
foreach ($tags as $tag) {
    $all += $tag['num'];
}
$average = $all / count($tags);
$list = $menu->getMenuList();
$setting = new Setting();
$siteName = $setting->getSiteName()->value;
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">