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

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

eZ debug

Timing: Jan 18 2025 04:59:04
Script start
Timing: Jan 18 2025 04:59:04
Module start 'content'
Timing: Jan 18 2025 04:59:04
Module end 'content'
Timing: Jan 18 2025 04:59:04
Script end

Main resources:

Total runtime0.8318 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0055 588.8359180.8438
Module start 'content' 0.00550.6573 769.6797571.0156
Module end 'content' 0.66290.1688 1,340.6953336.7500
Script end 0.8317  1,677.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00400.4750210.0002
Check MTime0.00150.1762210.0001
Mysql Total
Database connection0.00060.076410.0006
Mysqli_queries0.742189.21671970.0038
Looping result0.00280.34081950.0000
Template Total0.798796.020.3994
Template load0.00230.277620.0012
Template processing0.796495.743620.3982
Template load and register function0.00020.021910.0002
states
state_id_array0.00170.206310.0017
state_identifier_array0.00150.176920.0007
Override
Cache load0.00180.2164380.0000
Sytem overhead
Fetch class attribute can translate value0.00130.151230.0004
Fetch class attribute name0.00190.222560.0003
XML
Image XML parsing0.00410.491430.0014
class_abstraction
Instantiating content class attribute0.00000.002680.0000
General
dbfile0.00790.9555340.0002
String conversion0.00000.000530.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
10content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 27
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs