How to add class to "create.." dropdown on website_toolbar

Author Message

Jens Tiedemann

Sunday 02 March 2008 1:19:23 pm

Hi, how do I add a "custom" class (based on article) to the web interface toolbar. I've created the class ok - and it works fine from the admin interface - but how do I enable it for users of the web interface, so they can created new objects based on my custom class?

best regards,
Jens

Bruce Morrison

Sunday 02 March 2008 3:42:33 pm

Hi Jens

You'll have to ensure that the user is able to create (and edit) the new content class.

Cheers
Bruce

My Blog: http://www.stuffandcontent.com/
Follow me on twitter: http://twitter.com/brucemorrison
Consolidated eZ Publish Feed : http://friendfeed.com/rooms/ez-publish

Jens Tiedemann

Tuesday 04 March 2008 1:16:09 am

Hi Bruce, Tx - that sounds resonable.. I made a role/policy with read/create/edit/remove rights to my custom class - and assigned it to the administrator group (myself).. But still, my custom class is not available from the webinterface. But actually, the admin group should have had access to it without the extra role i suppose... From the admin interface, everything works fine (the object is part of the dropdown list for creating new objects in a folder as example...)

So is there a place /ini setting I need to register my custom class for it to be available through the web interface? Or is there something else I'm doing wrong?

regards, Jens

Jens Tiedemann

Tuesday 04 March 2008 4:47:34 am

Got a little closer - found the following:

--------------------------
Website toolbar for custom classes

By default, the website toolbar in 3.9 is only shown for classes shipped with the website interface. If you want it to be shown for a custom class, add your class' name to the AvailableForClasses[] array in extension/ezwebin/settings/websitetoolbar.ini and clear the cache ;)

If your class is a container, you also need to add it to the ContentClassContainers array in the same file to enable creating objects under it.
--------------------------

However, my custom class is still NOT available in the create drowdown on the toolbar. Rights to create/edit are OK - and no problem using the admin interface for the same user.

So question remains: How to add a custom class to the create dropdown on the website toolbar...

Jens Tiedemann

Wednesday 05 March 2008 4:04:22 am

Anyone? Who managed to put a custom class on the create dropdown list in the webinterface toolbar?

Mark Marsiglio

Wednesday 05 March 2008 8:12:03 am

Were you saying that even when logged in as admin you can't use the toolbar to create your new class?

Is the custom class that you created located in the content group? (setup > classes > content)

http://www.thinkcreative.com
Turning Ideas Into Strategic Solutions

Jens Tiedemann

Thursday 06 March 2008 11:30:21 am

Hi Mark
- YES to both answers...

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 19 2025 00:57:28
Script start
Timing: Jan 19 2025 00:57:28
Module start 'layout'
Timing: Jan 19 2025 00:57:28
Module start 'content'
Timing: Jan 19 2025 00:57:28
Module end 'content'
Timing: Jan 19 2025 00:57:28
Script end

Main resources:

Total runtime0.7330 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.3984152.6563
Module start 'layout' 0.00530.0029 742.054739.5078
Module start 'content' 0.00820.7231 781.5625619.0313
Module end 'content' 0.73130.0016 1,400.593816.0938
Script end 0.7329  1,416.6875 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.4530160.0002
Check MTime0.00130.1781160.0001
Mysql Total
Database connection0.00060.086410.0006
Mysqli_queries0.675292.1188710.0095
Looping result0.00070.0984690.0000
Template Total0.696895.120.3484
Template load0.00210.282220.0010
Template processing0.694794.777520.3474
Template load and register function0.00020.032110.0002
states
state_id_array0.00090.116110.0009
state_identifier_array0.00150.208320.0008
Override
Cache load0.00170.2370340.0001
Sytem overhead
Fetch class attribute can translate value0.00090.127030.0003
Fetch class attribute name0.00110.147190.0001
XML
Image XML parsing0.00120.157330.0004
class_abstraction
Instantiating content class attribute0.00000.002590.0000
General
dbfile0.00100.1325210.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
11content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
2content/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: 27
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs