ezwebin toolbar on plain site installation

Author Message

Reinhard Hutter

Tuesday 15 January 2008 8:04:05 am

Hello,
I've an existing ezPublish 3.9 plain_site installation, into which I'm integrating the frontside editing toolbar only as described by Andre R. in http://ez.no/developer/forum/install_configuration/install_website_interface

Most things work as intented, except after clicking the preview button on the editing toolbar I see two frontend editing toolbars, once the expected version_view toolbar, but also the standard toolbar with the create-select box.

My pagelayout.tpl looks like this:

    ...
    <td class="bottom_center">
      {* WEBSITE TOOLBAR START *}
      {$current_node_id = $module_result.node_id}
      {include uri="design:parts/website_toolbar.tpl"}
      {* WEBSITE TOOLBAR END *}
      <div class="content">{$module_result.content}</div>
      ...

The toolbar itself obviously notices when it is in editing mode and doesn't display website_toolbar.tpl included by pagelayout.tpl, and only displays website_toolbar_edit.tpl which is included by $module_result.content. However, when previewing, both website_toolbar.tpl as included by pagelayout.tpl itself and website_toolbar_preview.tpl included by $module_result.content are displayed.

Can anyone tell me how to prevent the standard editing toolbar from showing up when previewing changes via the frontend toolbar?

Thanks in advance,
Reinhard

André R.

Tuesday 15 January 2008 12:30:54 pm

Try the code from ezwebin pagelayout.tpl:

  <!-- Toolbar area: START -->
  <div id="toolbar">
  {if and( $current_node_id,
           $current_user.is_logged_in,
           and( is_set( $content_info.viewmode ), ne( $content_info.viewmode, 'sitemap' ) ),
           and( is_set( $content_info.viewmode ), ne( $content_info.viewmode, 'tagcloud' ) ) ) }
  {include uri='design:parts/website_toolbar.tpl'}
  {/if}
  </div>
  <!-- Toolbar area: END -->

http://svn.ez.no/svn/extensions/ezwebin/trunk/packages/ezwebin_extension/ezextension/ezwebin/design/ezwebin/templates/

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Reinhard Hutter

Thursday 17 January 2008 8:22:39 am

Thanks, checking for $module_result.content_info did it for me, if anyone else has similar troubles, my pagelayout.tpl now looks like:

      ...
      {* WEBSITE TOOLBAR START *}
      {def $current_node_id = $module_result.node_id}
      {def $content_info = hash()}
      {if is_set($module_result.content_info)}
        {set $content_info = $module_result.content_info}
        {include uri="design:parts/website_toolbar.tpl"}
      {/if}
      {* WEBSITE TOOLBAR END *}
      <div class="content">{$module_result.content}</div>
      ...

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.