daxslab/yii2-website-module
Composer 安装命令:
composer require daxslab/yii2-website-module
包简介
Yii2 module to manage website content. Kind of a CMS...
README 文档
README
Yii2 module to implement a website.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist daxslab/yii2-website-module "*"
or add
"daxslab/yii2-website-module": "*"
to the require section of your composer.json file.
Introduction
Website tries to be an unobstrusive CMS without limiting the capabilities of Yii2 framework as development platform. The idea is that you can add website features to an existing application, or just create a website based on Yii2 framework.
The idea behind Website module is a bit different compared with other CMS. While generally pages, posts and categories are managed, in Website everything is a page and every page can have children pages so,
- a page without subpages can be considered a regular page
- a page with subpages can be considered a category
- a subpage can be considered a post
The resulting tree can then have wathever depth is required.
Besides pages, Website also manages Media: any attached file that can be referenced in the resulting website. The module handles the uploading process.
Also you can manage Menus with Website module. For every menu you can create menu items and this than be pointed to any URL. When creating a menu item you either type the label and URL, or select from existing pages.
Configuration
Website is meant to be used with the Yii2 Advanced Application template. Some modification could be done to make it usable with basic template.
Module
First configure the module for all the apps in common/config/main.php
//...
'modules' => [
'website' => [
'class' => daxslab\website\Module::class,
'languages' => ['en', 'es', 'it'],
'token' => 'some-string-here'
]
]
//...
Here notice the specified attributes:
- languages: array with the languages that will be active for creating content
- token: string identifying every website in case that several are used.
Database
It is assumed that you are using some database and that the connection to it it's already set. Configure migrations in console/config/main.php
//...
'controllerMap' => [
'migrate' => [
'class' => 'yii\console\controllers\MigrateController',
'migrationNamespaces' => [
'daxslab\website\migrations',
]
],
],
//...
Controllers
Configure controllers namespaces for the module in each app. Let's start with frontend/config/main.php
//...
'modules' => [
'website' => [
'controllerNamespace' => 'daxslab\website\controllers\frontend'
]
]
//...
And similar for backend/config/main.php
//...
'modules' => [
'website' => [
'controllerNamespace' => 'daxslab\website\controllers\backend'
]
]
//...
Usage
The module provides two sets of controllers: frontend and backend.
daxslab/yii2-website-module 适用场景与选型建议
daxslab/yii2-website-module 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 257 次下载、GitHub Stars 达 5, 最近一次更新时间为 2019 年 03 月 08 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「module」 「cms」 「website」 「yii2」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 daxslab/yii2-website-module 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 daxslab/yii2-website-module 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 daxslab/yii2-website-module 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
Platine Database is the abstraction layer using PDO with support of query and schema builder
Integrate with Snipcart.
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
统计信息
- 总下载量: 257
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 5
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-03-08