wireframe-framework / wireframe
Wireframe 是 ProcessWire CMS/CMF 的输出框架。
Requires
- php: >=7.1
- processwire/processwire: >=3.0.112
- wireframe-framework/processwire-composer-installer: ^1.0.0
- dev-master
- 0.29.2
- 0.29.1
- 0.29.0
- 0.28.0
- 0.27.1
- 0.27.0
- 0.26.2
- 0.26.1
- 0.26.0
- 0.25.0
- 0.24.2
- 0.24.1
- 0.24.0
- 0.23.1
- 0.22.2
- 0.22.1
- 0.22.0
- 0.21.3
- 0.21.2
- 0.21.1
- 0.21.0
- 0.20.2
- 0.20.1
- 0.20.0
- 0.19.2
- 0.19.1
- 0.19.0
- 0.18.3
- 0.18.2
- 0.18.1
- 0.18.0
- 0.17.1
- 0.17.0
- 0.16.0
- 0.15.2
- 0.15.1
- 0.15.0
- 0.14.0
- 0.13.2
- 0.13.1
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.2
- 0.10.1
- 0.10.0
- 0.9.1
- 0.9.0
- 0.8.0
- 0.7.0
- 0.6.0
- 0.5.2
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.0
- 0.2.1
- 0.2.0
- 0.1.0
- 0.0.16
- 0.0.15
- 0.0.14
- 0.0.13
- 0.0.12
This package is auto-updated.
Last update: 2024-08-30 18:50:53 UTC
README
Wireframe 在没有更好的名称的情况下,是 ProcessWire CMS/CMF 的输出框架。它松散地遵循 MVC(模型-视图-控制器)架构,引入了如视图控制器等概念,用于 ProcessWire 网站开发。
技术上,Wireframe 是一个 ProcessWire 模块——称为 Wireframe——和相关类的组合。某些功能捆绑在一个单独的模块中,称为 Wireframe API;这个可选的伴随模块可以用来快速设置基于 JSON 的 API。
此 README 文件提供了设置 Wireframe 的基本说明。更详细的说明可以在 https://wireframe-framework.com 找到,如果你想看看使用 Wireframe 的示例网站,请务必查看 https://github.com/wireframe-framework/site-wireframe-boilerplate/。
入门
- 下载并安装 Wireframe ProcessWire 模块
获取模块的方式有几种
- 从 GitHub 克隆或下载: https://github.com/wireframe-framework/Wireframe
- 使用 Composer 安装: https://packagist.org.cn/packages/wireframe-framework/wireframe
- 在
/site/templates/
目录内设置 Wireframe 目录
如果你的网站已经存在同名文件夹,你可以将它们命名为其他名称,只要你也相应地调整配置设置($config->wireframe
数组)中的路径。更多详细信息请访问 https://wireframe-framework.com/docs/configuration-settings/。
或者,你可以安装从 GitHub 可用的 site-wireframe-boilerplate 网站配置文件: https://github.com/wireframe-framework/site-wireframe-docs。这是一个在 Wireframe 上运行的完整网站,因此如果你正在启动一个新项目,这可能很有用,但这不是你想要在已经设置好现有网站时使用的东西。
- 将模块目录中的
wireframe.php
复制到/site/templates/wireframe.php
这是启动 Wireframe 的文件。如果你想在初始化或渲染阶段向 Wireframe 传递变量,你可以直接修改此文件。
- 将
wireframe
添加为你想要使用 Wireframe 的模板的备用文件名
这可以通过从模板编辑屏幕中找到的备用模板文件名设置完成,这将使使用这些模板的页面请求通过 Wireframe 启动文件进行重定向。
注意:你实际上不必将 所有 模板通过 Wireframe 进行路由。如果你想要使用某些模板的其他输出策略,这将完全正常:只需为这些模板跳过步骤 4 即可。
资源
- Wireframe 以及一般输出策略的介绍: https://wireframe-framework.com/about/
- Wireframe 深入入门指南:https://wireframe-framework.com/getting-started/
- Wireframe 文档:https://wireframe-framework.com/docs/
- 支持论坛:https://processwire.com/talk/forum/61-wireframe/
许可证
本项目遵循 Mozilla 公共许可证第 2.0 版。