Forums / Setup & design / Hide rightmenu (no tool)

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

Hide rightmenu (no tool)

Author Message

Vicente Olivan

Monday 13 November 2006 10:05:50 am

My problem is hiding the space of rightmenu when it doesn´t assigned tool in a toolbar

How to do this? Some documentation?

Thanks

Jacobo Quiles

Tuesday 14 November 2006 12:31:32 am

Hi,

Take a look at this part of your pagelayout.tpl:

{cache-block}
  {let maincontentstyle='maincontent-bothmenus'}

  {section show=eq(ezini('SelectedMenu','LeftMenu','menu.ini'),'')}
      {set maincontentstyle='maincontent-noleftmenu'}
  {/section}

  {section show=ezini('Toolbar_right','Tool','toolbar.ini')|count|eq(0)}
    {section show=$maincontentstyle|eq('maincontent-noleftmenu')}
      {set maincontentstyle='maincontent-nomenus'}
    {section-else}
      {set maincontentstyle='maincontent-norightmenu'}
    {/section}
  {/section}

  <div id="maincontent" class="{$maincontentstyle}">
    <div id="fix">
      <div id="maincontent-design">
  {/let}

{/cache-block}

Make sure your $maincontentstyle var has the value 'maincontent-norightmenu'.

Microblau SL
http://www.microblau.net

Vicente Olivan

Tuesday 14 November 2006 2:21:01 am

Hi, Jacobo

I explain myself not well

- <b>node view</b> | tool in toolbar is not: All right

- <b>node view</b> | tool in toolbars: All right

- <b>node view</b> | tool in toolbar aasigned a node: I don´t like (when it´s not the specific node)

How to switch 'maincontent-bothmenu' for 'maincontent-norightmenu' when when happens this it?

Thanks

Jacobo Quiles

Thursday 30 November 2006 1:08:10 am

Hi Vicente, i am not sure if i still understand what you need.

You need to show the toolbar-right only on certain nodes? If so, just add conditions for setting the maincontent style and to show the toolbar.

Having this example structure:

- Home (node 2)
- Who we are (node 50)
- News (node 51)
- Contact (node 52)

This example will show the toolbar-right if the node being viewed is not the homepage (node 2) or the news folder (node 50):

pagelayout.tpl:
where it shows the toolbar-right:

{section show=ezini( 'Toolbar_right', 'Tool', 'toolbar.ini' )|count}
  {if and( is_set($module_result.node_id), 
      and( ne( $module_result.node_id,2), 
             ne($module_result.node_id,50))} {* <-- node check *}
    <div id="rightmenu">
        <div id="rightmenu-design">
            <h3 class="hide">Right menu</h3>
            <div id="toolbar-right">
                <div class="toolbar-design">
                    {tool_bar name=right view=full}
                </div>{* id="toolbar-design" *}
            </div>{* id="toolbar-right" *}
        </div>{* id="rightmenu-design" *}
    </div>{* id="rightmenu" *}
  {/if}
{/section}

pagelayout.tpl:
where it loads the maincontent style:

{cache-block}

{let maincontentstyle='maincontent-bothmenus'}
  
{section show=eq(ezini('SelectedMenu','LeftMenu','menu.ini'),'')}
    {set maincontentstyle='maincontent-noleftmenu'}
{/section}

{section show=ezini('Toolbar_right','Tool','toolbar.ini')|count|eq(0)} {* <-- Enters here as there is a toolbar-right defined *}
    {section show=$maincontentstyle|eq('maincontent-noleftmenu')}
        {set maincontentstyle='maincontent-nomenus'}
    {section-else}
        {set maincontentstyle='maincontent-norightmenu'}
    {/section}
{/section}

{if and( is_set($module_result.node_id),
     or( eq($module_result.node_id,2), 
          eq($module_result.node_id,50)))} {* <-- node check *}
    {set maincontentstyle='maincontent-norightmenu'} 
{/if}

<div id="maincontent" class="{$maincontentstyle}">
    <div id="fix">
    <div id="maincontent-design">
{/let}

{/cache-block}

Cheers.

Microblau SL
http://www.microblau.net