Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,090 of 9,090 pages
About the help in other languages
All help pages

Declaring dependencies in extension.xml

The dependencies block of extension.xml - extends, requires and uses - what each does to the loading order, a real example, and how it relates to Composer's require.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/designers/extensions/dependencies-in-extension-xml.md

On this page

Declaring dependencies in extension.xml

This page is for designers whose theme needs or builds on another extension.

The block

cjw_newsletter declares that it extends ezwt:

<software>
    <metadata>...</metadata>

    <dependencies>
        <extends>
            <extension name="ezwt" />
        </extends>
    </dependencies>
</software>

The three kinds

The kernel reads the block in ezpExtension::getLoadingOrder() (kernel/private/classes/ezpextension.php):

ElementLoads your extensionUse it for
<extends>before the named one (yours wins)A theme that overrides templates or settings of a base theme
<requires>after the named oneSomething your theme cannot work without, for example a layouts engine
<uses>after the named oneSomething your theme uses when present

The order is applied when site.ini [ExtensionSettings] ExtensionOrdering=enabled. It only orders extensions that are active: declaring <requires> does not activate the other extension, and the kernel still loads yours if the other one is missing. Say in your README what has to be installed and active.

Step by step

  1. Decide for each other extension: does your theme override it (extends) or rely on it (requires, uses)?
  2. Add the block to extension.xml after <metadata>.
  3. Check the file: xmllint --noout extension/mytheme/extension.xml (no output expected).
  4. Clear the INI cache and look at Setup > Extensions: the card shows the real loading position.
  5. Add the same dependencies to composer.json (require or suggest) so Composer installs them (require and suggest).

A broken extension.xml is reported in the debug output and its loading order is ignored, so step 3 matters.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x