EZP Version >= 5.3

Configuring the display of the Website Toolbar

To have the regular Webin Toolbar, first add the proper CSS file to your head template : extension/ezwt/design/standard/stylesheets/websitetoolbar.css

<style type="text/css">
    @import url("{{ asset('extension/ezwt/design/standard/stylesheets/websitetoolbar.css') }}");
</style>

 

Then, in your template, you can add the Webin Toolbar by definining the display of the websiteToolbarAction from the ezpublish_legacy.website_toolbar.controller Controller

{% if location is defined %}
    {{ render( controller( "ezpublish_legacy.website_toolbar.controller:websiteToolbarAction", { 'locationId': location.id} ) ) }}
{% endif %}

Redirection after publishing

Versions: 5.3.4, 5.4.1.

In order to get properly redirected after publishing or discarding, overrides of legacy's content/edit.tpl must include the content/edit_redirection.tpl. It adds hidden fields required by legacy for those redirections.

<form method="POST" action="content/edit/...">
  <!--...-->
  {include uri="design:content/edit_redirection.tpl"}
</form>

About the website_toolbar controller

The websiteToolbarAction renders the whole Webin Toolbar, and if the logged in user doesn't have the required permission, an empty response is returned