dev-master
9999999-devSiter Frontend Editing Bundle for eZ Publish Platform
GPL-2.0
The Requires
- php >=5.3.3
Wallogit.com
2017 © Pedro Peláez
Siter Frontend Editing Bundle for eZ Publish Platform
Full featured frontend editing bundle for eZ Publish Platform (new stack). The new eZ Publish Platform does not come with a native frontend editing tool, this bundle implements frontend editing relying heavily on Angular JS, Twitter Bootstrap and Font-awesome for the icons., (*1)
Your pagelayout needs to use boostrap and font-awesome in order for the frontend editing to look good. Meaning the design needs to be based on those., (*2)
Add this to composer.json:, (*3)
"require": {
"siter/ezpublish-frontendeditingbundle": "@dev"
}
and run:, (*4)
composer update siter/ezpublish-frontendeditingbundle
This bundle includes less files for the CSS of the frontend editing, you you need to setup less., (*5)
First edit config.yml, setup assetic less filter, install nodejs and less compiler., (*6)
assetic:
debug: "%kernel.debug%"
use_controller: false
bundles: [ SiterFrontendEditingBundle ]
#java: /usr/bin/java
filters:
# .....
less:
node: /usr/local/bin/node
node_paths: [/usr/local/lib/node_modules]
apply_to: "\.less$"
Edit the ezpublish/EzPublishKernel.php and add:, (*7)
$bundles[] = new Siter\FrontendEditingBundle\SiterFrontendEditingBundle();
Edit the ezpublish/config/routing.yml and add:, (*8)
siter_frontend_editing:
resource: "@SiterFrontendEditingBundle/Resources/config/routing.yml"
prefix: /frontendediting
Dump asset for prod and dev. change --env., (*9)
php ezpublish/console assetic:dump --env="prod"
This is the very important step and it needs to be done correctly in order for the frontend editing layout to work., (*10)
Right after the <body> tag add:, (*11)
{% include 'SiterFrontendEditingBundle:editsuite:pagewrapper_start.html.twig' %}
Right after your first main page container e.g. <div id="page"> add:, (*12)
{% include 'SiterFrontendEditingBundle:editsuite:toolbar.html.twig' %}
Right before </body> add:, (*13)
{% include 'SiterFrontendEditingBundle:editsuite:pagewrapper_end.html.twig' %}
Say you list children from a parent node ( e.g. a menu or a listview or blockview of items ). If you want the editor to be able to forexample place an article and news_article in a zone add, lets see how you can do that:, (*14)
Add the following to the container of the children:, (*15)
<div class="content-view-children"
{% if is_granted( 'IS_AUTHENTICATED_FULLY' ) %}
data-location="{{ parent.id }}"
ng-drop="true"
ng-drop-success="dropNewChildComplete($data,$event)"
ng-drop-hit-check="dropNewChildHitCheck($data, $event)"
data-dropablecontent
data-allowed_contenttypes="['article','news_article']"
{% endif %}
>
Here is your normal logic to list articles and news articles.
</div>
I am happy to take pull requests, feature ideas and such., (*16)
Siter Frontend Editing Bundle for eZ Publish Platform
GPL-2.0