davidjeddy/yii2-pieces-theme 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

davidjeddy/yii2-pieces-theme

最新稳定版本:2.2

Composer 安装命令:

composer require davidjeddy/yii2-pieces-theme

包简介

Pieces Theme

关键字:

README 文档

README

About

Yii2 Custom Theme for pieces-compendium.com

Badges

--need SensioLabs tests setup-- Latest Stable Version Total Downloads Latest Unstable Version License Monthly Downloads Daily Downloads

Credit

Based on https://github.com/sheillendra/yii2-theme.

Installing

  • Run php composer.phar require davidjeddy/yii2-pieces-theme on the terminal in your {project root}
  • Or add "davidjeddy/yii2-pieces-theme": "^2" to your projects composer.json in the "required": [...] section, then execute a php composer.phar update -o command.

Next edit /application/root/path.env (or create if one does not exist). Edit the proper values for STORAGE_HOST_INFO. Example: STORAGE_HOST_INFO = https://storage.pieces-compendium.

Then edit the applications ./config/web.php (or similar):

    'components' => [
    ...
        'assetManager' => ['linkAssets' => true],
        'view' => [
            'theme' => [
                'pathMap' => [
                    '@app/views' => '@vendor/davidjeddy/yii2-pieces-theme/src/views',
                ],
            ],
        ],
    ...
],

Structure:

backend/
    ...
    views/
    web/
        ...
        themes/
            themes_1/
                assets/
                views/
                    layout/
                    controller_name/
                    ...
            themes_2/
            themes_3/

Usage

In your application's view layout file, initialize the theme.

public function init()
{
    parent::init();
    \Yii::$app->view->theme->pathMap[your_module_name.'/views'] = [your_module_name.'/themes/'.\Yii::$app->view->theme->active.'/views'];
    // custom initialization code goes here
}

统计信息

  • 总下载量: 105
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-10-19