3

I am very new to ExpressionEngine and don't quite fully understand all the concepts yet as I come from a solid OOP environment. When would you use functions in modules and when would you use functions in Extensions?

3

Extensions are used when you want to take over, modify, or perform extra routines when native first-party methods are executed. For example, performing extra actions after an entry is saved.

Modules (and Plugins to an extent) are used when you want to make functionality (and therefore output) available in Templates via tags. Things that need to occur in a template, or add functionality that is explicitly outside of ExpressionEngine's native feature set.

You can find an overview of the different types of add-ons for ExpressionEngine (including Extensions, Modules, Plugins, Fieldtypes, and more) as well as some sample code and walkthroughs in the Add-on Development section of the User Guide.

| improve this answer | |
  • 1
    Also note that many third-party add-ons also have their own extension hooks which can be used to extend their functionality via custom extensions as well. – Derek Hogue Jun 3 '14 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.