, (*1)
This bundle adds an additional Tips block (aka Tip of the Day block) into eZ Systems eZ Platform Enterprise Edition Studio. This bundle can be used for a demonstration purpose on how to build new blocks for eZ Studio., (*2)
, (*3)
Requirements
- eZ Platform 1.5 or later
- eZ Systems LandingPageFieldType 1.5 or later
Installation
This package is available via Composer, so the instructions below are similar to how you install any other open source Symfony Bundle., (*4)
Run the following command in a terminal, from your Symfony installation root (pick the most recent release):, (*5)
composer require clash82/ezplatform-studio-tips-block
Enable the bundle in app/AppKernel.php file:, (*6)
$bundles = array(
// IMPORTANT: Clash82EzPlatformStudioTipsBlockBundle must be placed above LandingPageFieldTypeBundle to work properly
new Clash82\EzPlatformStudioTipsBlockBundle\Clash82EzPlatformStudioTipsBlockBundle(),
// existing bundles
new EzSystems\LandingPageFieldTypeBundle\EzSystemsLandingPageFieldTypeBundle(),
...
);
Install additional assets (CSS) for default template (omit this step if you are planning to use custom stylesheets):, (*7)
{% stylesheets
'bundles/clash82ezplatformstudiotipsblock/css/style.css'
%}
<link rel="stylesheet" type="text/css" href="{{ asset_url }}">
{% endstylesheets %}
If you are installing the bundle via composer require you must also copy assets to your project's web directory. You can do this by calling Symfony's built-in command from the project root directory:, (*8)
php app/console assets:install --symlink
In production environment you have to dump assets using the Assetic built-in command:, (*9)
php app/console assetic:dump -e=prod
Install new Tip ContentType using a built-in installer:, (*10)
php app/console ezstudio:tips-block:install
Usage
First you have to create a new Folder and add some tips using the new Tip ContentType. After that, go to the eZ Studio dashboard and drag a new Tips block into a selected zone in your landing page. Click on the block settings and choose a folder as a Parent container. After publishing you should see a new block with a randomly selected tips., (*11)