studiobosco/wn-pagepreview-plugin
最新稳定版本:v1.1.5
Composer 安装命令:
composer require studiobosco/wn-pagepreview-plugin
包简介
WinterCMS Page Preview Plugin
README 文档
README
WinterCMS Plugin that replaces the "Preview" button for static pages, mail templates and other model forms with a real time preview.
After installing go to Settings > Page Preview and enable what you need. Then click the "Preview" button in the edit form.
Adding preview for model update forms
To create a preview button for a model you must first register the model form controller and the model class:
\StudioBosco\PagePreview\Classes\PreviewManager::registerPreview($controllerClass, $modelClass);
Then you must add a "preview" method to the model:
public function preview()
{
return 'this is the preview';
}
Optionally you can add the preview button to the model fields:
fields:
preview_button:
type: partial
path: $/studiobosco/pagepreview/partials/_model_preview_button.htm
If you do not add it the plugin will add it automatically, but eventually in the wrong position.
统计信息
- 总下载量: 1.03k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-04-30