Path

ez.no / ezpublish / documentation / development / extensions / introduction to extensions


Introduction to extensions

These documentation pages are no longer maintained. Please visit the new documentation site.

Extension system

eZ publish is built in a modular way. Much is created with a plug-in system. This allow us to easily extend the functionality of eZ publish. However, we should try to avoid changing the kernel of eZ publish. This is to make it easier to upgrade to a newer eZ publish version later. New datatypes, workflow events and so on should be created as extensions. This will also make it easier to share your extensions with other eZ publish users.

Setting up an extension

All extensions have a separate directory placed in the extension/ directory in the eZ publish root directory. The extension must then be activated in site.ini (or preferably the override). Just add the extension directory name to the ActiveExtensions[] array in the ExtensionSettings block.

settings/override/site.ini.append:

[ExtensionSettings]

ActiveExtensions[]=myExtension

ActiveExtensions[]=anotherExtension

However, if you want to activate an extension from siteaccess you must use the ActiveAccessExtensions[] array instead:

settings/siteaccess/mydesign/site.ini.append

[ExtensionSettings]

ActiveAccessExtensions[]=myExtension

ActiveAccessExtensions[]=anotherExtension

This will activate the extensions placed in extension/myExtension/ and extension/anotherExtension/.

Directory structure

We have a new directory structure inside the directory of our extension:

Directory

Description

actions/

New actions for forms

datatypes/

A directory for new datatypes

design/

Design extensions

eventtypes/

New event types for workflows

modules/

Kernel extensions

settings/

Settings for this extension

translations/

Translation extensions for the x18n template operator

Comments

Thanks, Bruce!

Bruce - great example code and explanation. Thanks so much for pointing me in the right direction. I can't wait to dig in and make my first action!

Action Explaination

Lukasz Serwatka blogged about form actions here:
http://www.serwatka.net/en/blog/do_you_need_action

Form Action Example

Hey can someone point me to an example of creating a new form action in the "actions" directory? I'd like to create an extension where a user can enter some information in a form, hit submit, and my extension could use the users input to perform various actions.

Re: Does this belong to the actual version?

Yes, if it doesn't exist in your setup, then you need to create the directory.

Alex

Does this belong to the actual version?

Hey,

I couldn't find the directory extension/ in my actual installation. Do I have to create this directory or is this a comment to an older version?

Contents

Development

Extensions
    Translation
    Introduction to extensions
    Building an eZ publish module
    Design extension
    Datatypes
    Workflow events
    Module
    Template operator
    Template function
eZ publish datamodel
eZ publish tuning and stability
Importing attribute data
Kernel
Libraries
Scripting
Standards
System overview
Test Suite
Using Doxygen to create API documenta...


Created

10/07/2003
10:00:53 am
by Jo Henrik Endrerud

Last updated

11/07/2003
11:18:28 am
by Björn Dieding@xrow.de

Authors

Jo Henrik Endrerud
Vidar Langseid
Björn Dieding@xrow.de



This page is part of the eZ Publish documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.