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 » Learn » eZ Publish » Creating Custom Admin Modules & Views

Creating Custom Admin Modules & Views

Monday 18 April 2011 11:42:34 pm

  • Currently 4 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Updating the User class

We can now prepare the CMS for our module. Since we are building a simple mailing list module, we need to be able to differentiate between users who wish to be part of the mailing and those who do not. To do this we need to add an additional attribute to the User content class. Updating a content class is a straightforward process. All classes are split into content groups and these in turn can be restricted according to location in the CMS and by user by using the comprehensive roles and policies available in eZ Publish (these can also be limited in other ways). Go to the settings tab and click on “Classes” in the left hand navigation. You will now be presented by two sections of grouped content. The top section contains the content groups all of the content classes are grouped into. Below that we have the classes which have most recently been updated.

If you do not see the User class within the bottom section of the page, click on the “Users” Content Group in the top section. Once you see the User class listed, click on the pencil icon to the right of the name to edit the class.

To add an attribute, go to the bottom of the page and you will see an option to “Add attribute”. Please note the location of the link varies according to which version of eZ Publish you are using. In 4.3 onwards, it is on the right but in previous versions it is on the left.

We want to add a checkbox with the following settings:

  • Name : I want to receive email updates
  • Identifier: newsletter

The final result should look as follows:



Next, click OK and our class is ready.

I would recommend at this point creating a couple of test users and make sure the checkbox is checked for each of them, just to make sure we have content in place for the remainder of this tutorial.



Printer Friendly version of the full article on one page with plain styles


Proudly Developed with from