disable left menu in the homepage

Author Message

Fernando Marinò

Tuesday 21 July 2009 3:13:40 am

hi,
as the title say, I want to hide the left menu in the homepage (that is a folder). How can I do that?

I searched in the menu.ini file, but it seems I don't find what I need.

Gaetano Giunta

Tuesday 21 July 2009 5:41:41 am

what design and siteaccess are you using? dis you install plain / ezwebin / ezflow packages?

Principal Consultant International Business
Member of the Community Project Board

Fernando Marinò

Tuesday 21 July 2009 5:56:24 am

i'm using the standard sitedesign. I've installed ezwebin but not ezflow.

Gaetano Giunta

Tuesday 21 July 2009 7:18:44 am

- enable debugging (alter site.ini;append.php and add these lines)

[ContentSettings]
ViewCaching=disabled

[DebugSettings]
DebugOutput=enabled
DebugRedirection=disabled

AlwaysLog[]=warning
AlwaysLog[]=debug
AlwaysLog[]=notice
AlwaysLog[]=strict

[TemplateSettings]
DevelopmentMode=enabled
ShowUsedTemplates=enabled
Debug=disabled
ShowXHTMLCode=enabled

[OverrideSettings]
Cache=disabled

- look up the templates used to render the homepage

- you will need to change the template used to render the homepage (a node of type folder). If you want other folders to show the left menu, you need to create an override template:
a -- create design/plain_site/override/templates/full/homepage.tpl, copying the code from the template you are currently using, and rip off the menu part
b -- set up an override rule in override.ini.append.php to use homepage.tpl for the root node

Principal Consultant International Business
Member of the Community Project Board

Fernando Marinò

Tuesday 21 July 2009 7:59:13 am

already done, I've posted this because the problem persist.

In the homepage I see this:

<!-- Side menu area: START -->

<!-- START: including template: extension/ezwebin/design/ezwebin/templates/page_leftmenu.tpl (extension/ezwebin/design/ezwebin/templates/page_leftmenu.tpl) -->

after the inclusion of the template, it start building the main area with my custom home template:

<!-- Main area content: START -->

<!-- START: including template: extension/ezwebin/design/ezwebin/override/templates/home.tpl (design:node/view/full.tpl) -->

i noticed that if I use a frontpage node everywhere in the site, I don't see the left menu. The question is, it's possible to obtain the same thing but only for one node? if not, it is possible to swap the root content node with a frontpage?

Gaetano Giunta

Wednesday 22 July 2009 1:24:54 am

Sorry, I misread you reply - I thought you where using the 'standard' design from 'plain' install.

For the 'ezwebin' design things are a bit different:
- the inclusion of the left menu is done from within the pagelayout template, not the node template (extension/ezwebin/design/ezwebin/templates/pagelayout.tpl)
- the ezpagedata() template operator is used in the pagelayout to decide whether the left menu should be displayed or not
- in turn, it gets its info from the 'HideLeftMenuClasses' param in menu.ini

So to resolve your problem you could
- create a new class: homepage_folder, and use it only for the homepage instead of your current folder class, adding it to HideLeftMenuClasses
- override the template for the pagelayout based on node_id = 2 and create a pagelayout template that is identical but does not include the left menu
- use as main design a custom one of your invention instead of the ezwebin one, then copy the ezwebin pagelayout in your own design and alter it adding an "if node_id != 2" around the inclusion of page_leftmenu.tpl

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Wednesday 22 July 2009 1:26:27 am

ps: to swap the root node with another node, use the context menu on the root node icon in the navigation treemenu on the left in the admin interface: adnaced => swap object

Principal Consultant International Business
Member of the Community Project Board

Fernando Marinò

Wednesday 22 July 2009 2:47:22 am

tnx! it works!

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