clash82 / ezplatform-studio-tips-block
为 eZ Studio 附加的提示块。
v1.0.0
2017-01-02 15:26 UTC
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2024-09-15 10:45:50 UTC
README
此包将一个额外的提示块(又称“每日提示”块)添加到 eZ Systems eZ Platform 企业版 Studio。此包可用于演示如何为 eZ Studio 构建新块。
需求
- eZ Platform 1.5 或更高版本
- eZ Systems LandingPageFieldType 1.5 或更高版本
安装
此包可通过 Composer 获取,因此以下说明与其他开源 Symfony Bundle 的安装方法相似。
在终端中运行以下命令,从您的 Symfony 安装根目录(选择最新版本)
composer require clash82/ezplatform-studio-tips-block
在 app/AppKernel.php
文件中启用该包
$bundles = array( // IMPORTANT: Clash82EzPlatformStudioTipsBlockBundle must be placed above LandingPageFieldTypeBundle to work properly new Clash82\EzPlatformStudioTipsBlockBundle\Clash82EzPlatformStudioTipsBlockBundle(), // existing bundles new EzSystems\LandingPageFieldTypeBundle\EzSystemsLandingPageFieldTypeBundle(), ... );
为默认模板安装额外的资产(CSS)(如果您计划使用自定义样式表,请跳过此步骤)
{% stylesheets 'bundles/clash82ezplatformstudiotipsblock/css/style.css' %} <link rel="stylesheet" type="text/css" href="{{ asset_url }}"> {% endstylesheets %}
如果您通过 composer require
安装包,您还必须将资产复制到项目的 web
目录。您可以从项目根目录调用 Symfony 的内置命令来完成此操作
php app/console assets:install --symlink
在生产环境中,您必须使用 Assetic
内置命令导出资产
php app/console assetic:dump -e=prod
使用内置安装程序安装新的 Tip
内容类型
php app/console ezstudio:tips-block:install
用法
首先,您必须创建一个新的 Folder
,并使用新的 Tip
内容类型添加一些提示。然后,转到 eZ Studio 控制面板,将新的 Tips
块拖到着陆页上的选定区域。点击块设置,选择文件夹作为父容器。发布后,您应该会看到一个包含随机选择的提示的新块。