This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » Extensions » Module in class view

Module in class view

Module in class view

Monday 04 October 2010 8:21:13 pm - 3 replies


I created a new extension for ez publish, how can I show it in the drop down list in class view? - the same way the users add new Article, i need my module. Can anyone help me with this?

Tuesday 05 October 2010 10:12:37 am

In module.php of your extension module you need to specify a function list. e.g.:

$FunctionList['some_function'] = array( );   //FUNCTION WITHOUT LIMITATION

Then in the same file for module view specify that function:

$ViewList['some_view'] = array( 
 'script' => 'some_view.php',
 'functions' => array( 'some_function' ),
 'params' => array( )

Modified on Tuesday 05 October 2010 10:13:07 am by Ivo Lukač

Tuesday 05 October 2010 2:11:17 pm

Hello Ivo, thank you for replying.

I have this code in my module.php. But when I log in, and toolbar shows up, I can only access default classes (Article, Blog, Blog post, Comment,...), and also classes I created via Administrator panel (Setup -> Classes -> New Class...)

Currently if I want to access my module I have to do it via URL e.g.: http://localhost:8085/newez/index.php/ezuser/modul/list/

I need some way to have this inside the dropdown in toolbar so editors can also add this to some site. Currently this module returns only a plain site, I want to display it inside a folder or article as an object. I need some more elegant way to use it rather than just URL. So I would be able to create new instance...

Modified on Tuesday 05 October 2010 3:09:19 pm by Ivan Švogor

Tuesday 05 October 2010 9:22:08 pm

@Ivan: you seem to be confused. Either that, or I am.

When you create a new module and some views inside it, it is your job to create where appropriate in templates the links/forms that will send the user to your new module/view url

The classes listed in the 'create here' dropdown are the content classes that are

1. defined in the system (in administration|classes) panel

2. available to the current user within the roles & policies section - ie. the user has permission on content/create for those classes within the current node

I have a hard time understanding what you mean by having users being able to get redirected to your module when they select to create a new "class XXX" object.

Anyway, it could be done by:

. finding out the template used to fill that dropdown, and overriding it

. adding to the list yor custom 'fake' line

. adding some js magick that intercepts the 'onclick' event of the 'create here' button and, if your fake class is selected, send user to your module instead of sending him to content/action


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from