New menu items in left menu?

Author Message

Steven Stieng

Wednesday 02 June 2010 3:08:43 am

I've installed one of the default templates coming with eZ, and created some pages.

Now, pages created with the Frontpage class and Folder class, are displayed in the left menu in admin mode. But if I create an article, it's not shown in the left menu.

I understand that articles should not be displayed in left menu. So my question is:

How can I create e new class which is shown as a menu item in the same way that Folder and Frontpage is? 

Steven Stieng

Wednesday 02 June 2010 4:43:56 am

Ok! After some fierce googling, I finally managed to find something that helped me!

To be able to display custom templates / classes in left menu (in admin mode), you have to configure the ini file called contentstructuremenu.ini.php.

It's located in "settings/siteaccess/(your_admin_siteaccess)/"

This file will have something like:

<?php /*
[TreeMenu]
ShowClasses[]
ShowClasses[]=folder
ShowClasses[]=user_group
ShowClasses[]=custom_class
*/ ?>

The last one, is the name of your custom class, e.g.  ShowClasses[]=page_article_full.
It's the same as the identifier of your class. 

 

Now that it displays in the backend,  I have to figure out how to get it do dispaly by default frontend as well. Probably some other config file.

Andy Boston

Thursday 10 June 2010 4:16:15 am

To get to show on the site left hand menu you need to edit your settings/siteaccess/eng/menu.ini.append.php

look for

[MenuContentSettings]

LeftIdentifierList[]
LeftIdentifierList[]=custom_class
LeftIdentifierList[]=custom_class
LeftIdentifierList[]=custom_class

And add your new classes to the list and the new classes should magically appear. You can do this to include new classes in the topmenu too.

Hope that helps :)

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

eZ debug

Timing: Jan 18 2025 05:13:37
Script start
Timing: Jan 18 2025 05:13:37
Module start 'layout'
Timing: Jan 18 2025 05:13:37
Module start 'content'
Timing: Jan 18 2025 05:13:37
Module end 'content'
Timing: Jan 18 2025 05:13:37
Script end

Main resources:

Total runtime0.7297 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.9063152.6250
Module start 'layout' 0.00520.0025 740.531339.4453
Module start 'content' 0.00780.7205 779.9766506.0703
Module end 'content' 0.72830.0014 1,286.046912.1641
Script end 0.7296  1,298.2109 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4583160.0002
Check MTime0.00140.1856160.0001
Mysql Total
Database connection0.00070.100310.0007
Mysqli_queries0.678192.9250570.0119
Looping result0.00050.0732550.0000
Template Total0.697695.620.3488
Template load0.00210.281220.0010
Template processing0.695695.317420.3478
Template load and register function0.00010.020310.0001
states
state_id_array0.00090.119910.0009
state_identifier_array0.00240.323320.0012
Override
Cache load0.00170.2326340.0000
Sytem overhead
Fetch class attribute can translate value0.00080.103620.0004
Fetch class attribute name0.00100.135240.0002
XML
Image XML parsing0.00050.074320.0003
class_abstraction
Instantiating content class attribute0.00000.001540.0000
General
dbfile0.00080.1092160.0000
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

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
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 15
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs