示例#1
0
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;
?>
">
<head>
    <meta charset="<?php 
echo Yii::$app->charset;
?>
">
    <meta name="viewport" content="width=device-width, initial-scale=1">