sebastianlenz / contentfield
一个用于编辑结构化内容的Craft字段类型
Requires
- ext-curl: *
- ext-dom: *
- ext-libxml: *
- ext-zlib: *
- craftcms/cms: ^4.4.5
- craftcms/redactor: ^3.0.4
- sebastianlenz/craft-utils: ^3.0.9
- symfony/yaml: ^5.4.21
Requires (Dev)
- codeception/codeception: ^4.0.0
- codeception/module-asserts: ^1.0.0
- codeception/module-datafactory: ^1.0.0
- codeception/module-yii2: ^1.0.0
- craftcms/phpstan: dev-main
- phpstan/phpstan: ^1.5
- vlucas/phpdotenv: ^3.0
This package is auto-updated.
Last update: 2024-09-25 10:17:01 UTC
README
在Craft中使用模板的最佳方式。
此字段允许开发者在模板中直接定义控制面板字段。根据需要可以嵌套和混合模板,从而可以轻松构建复杂的内容层次结构。所有这些都能带来巨大的性能提升。
需求
此插件需要Craft CMS 4或更高版本。
安装
您可以从插件商店或使用Composer安装此插件。
从插件商店
转到您项目控制面板中的插件商店,搜索“Content Field”。然后在模态窗口中点击“安装”按钮。
使用Composer
打开您的终端并运行以下命令
# Go to the project directory
cd /path/to/my-project
# Tell Composer to load the plugin
composer require sebastianlenz/contentfield
# Tell Craft to install the plugin
./craft install/plugin contentfield
文档
我们已经整理了一份涵盖此插件所有方面的文档。您可以在以下位置找到在线版本
https://sebastian-lenz.github.io/craft-contentfield/
示例
如果您更喜欢阅读一些我们编写的代码,我们创建了一个网站,通过一系列小型示例展示了此插件的功能
https://github.com/sebastian-lenz/craft-contentfield-examples
展示
最后,如果您想看看此插件的实际效果,这里有一个类似于实际用例的展示
https://github.com/sebastian-lenz/craft-contentfield-showcase
注意事项
在开始使用Content Field之前,请仔细考虑以下注意事项
-
字段将所有数据存储为JSON数据块到数据库中。您无法以任何方式查询、排序或筛选保存的数据。
-
在构建数据结构时,我们使用自己的自定义字段。您不能在Content Field中使用其他Craft字段。
许可证
此插件使用Craft许可证。如果您在商业项目中使用此插件,请考虑为其获得许可。