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.