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

eZ Community » Learn » eZ Publish » An Introduction to Developing eZ...

An Introduction to Developing eZ Publish Extensions

Friday 10 December 2010 10:24:31 am

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

Before talking about the example extension, I will explain the concept of extensions and talk about the structure of extensions.

An extension provides additional functionality (or extends existing functionality) in eZ Publish. It is called an extension because it plugs in to the eZ Publish core without requiring modifications to the original files. By placing new functionality in an extension, you can upgrade the eZ Publish version without affecting the extension.

Some examples of what you can do with extensions:

  • save the design of a website / siteaccess
  • create custom modules with new views and template fetch functions
  • extend the template system with custom template operators
  • program new workflow events, datatypes or login handlers

Extensions in eZ Publish usually adhere to a standard directory structure, as outlined in Table 1 below.

Extension subdirectory Description
actions/ New actions for forms
autoloads/ Definitions of new template operators
datatypes/ Definitions for new datatypes
design/ Files (*.tpl, *.css, *.jpg, *.js ...) related to the design
eventtypes/ Custom workflow events
modules/ One or more modules with views, template fetch functions, and so on
settings/ Configuration files (*.ini, *.ini.append.php)
translations/ Translation files (*.ts)

Table 1: Standard directory structure of an eZ Publish 4.x extension

The directory structure shown above is only an example. The actual directory structure you use depends on the type of extension. Some directories may not be necessary. For example, a Template Operator extension only requires the directories autoloads/ and settings/; in a module extension, only the directories modules/ and settings/, and maybe a design/ directory, are required.

36 542 Users on board!

Tutorial menu

Printable

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

Author(s)

Proudly Developed with from