Forums / General / How to add classes to admin content structure menu

How to add classes to admin content structure menu

Author Message

Heath

Monday 10 November 2008 6:41:53 am

How is it possible to add content classes (for display) within the administration content structure menu.

One would think there is an ini setting which allows a developer to display custom content classes within the content structure menu.

For example I'm looking in this example to enable the class 'Article' and 'Gallery' to be displayed in the content structure menu.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Greg McAvoy-Jensen

Monday 10 November 2008 6:55:47 am

Heath,

It's tucked in contentstructuremenu.ini:

[TreeMenu]
ShowClasses[]
ShowClasses[]=folder
...

Granite Horizon, Certified Developer of eZ Publish Web Solutions
Provider of the SaaS Solution Granite Horizon In The Cloud | http://granitehorizon.com/cloud
http://granitehorizon.com | +1 916 647 6350 | California USA | @granitegreg
Blog: http://granitehorizon.com/blog

Heath

Monday 10 November 2008 7:23:06 am

@Greg

Yes. I am familiar with the settings, TreeMenu:ShowClasses:*
I have added the classes to this settings block in the

file: <i>settings/override/contentstructuremenu.ini.append.php</i>

# which classes to show
ShowClasses[]
ShowClasses[]=folder
ShowClasses[]=forum
ShowClasses[]=gallery
ShowClasses[]=user_group
ShowClasses[]=article
# ShowClasses[]=frontpage
ShowClasses[]=feedback_form

I have cleared all cache

sudo php bin/php/ezcache.php --clear-all

Yet the article class is not displayed within the administration's <i>dynamic</i> content structure menu.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

Heath

Tuesday 11 November 2008 1:12:26 pm

I reviewed the source code for the dynamic_content_structure menu template and did not notice the usage of the 'ShowClasses' configuration ini variable.

Is there any known reason why my additional custom class entries would not be displayed.

Assuming for the sake of argument that the cache is clearing properly (I deleted the contents of the var/cache and var/(siteaccess)/cache).

Respectfully,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org

André R.

Tuesday 11 November 2008 1:21:53 pm

Tried clearing tree menu cache? (from admin)

eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription
@: http://twitter.com/andrerom

Heath

Tuesday 11 November 2008 4:59:19 pm

It seems that while I thought the global override directory's file, <i>settings/override/contentstructuremenu.ini.append.php</i> would override the admin siteaccess' copy of the same file, <i>settings/siteaccess/starsadmin/contentstructuremenu.ini.append.php</i>

All I had to do was add the classes in the manner Greg recommends to the admin siteaccess settings file, clear cache as Andre recommends and the content structure menu changed.

Thank you to Greg and Andre for their assistance in my search for the answer.

Cheers,
Heath

Brookins Consulting | http://brookinsconsulting.com/
Certified | http://auth.ez.no/certification/verify/380350
Solutions | http://projects.ez.no/users/community/brookins_consulting
eZpedia community documentation project | http://ezpedia.org