We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog

ExpressionEngine 7.5 Code Generators

10/11/2024   /   By Tom Jaeger

ExpressionEngine 7.5 takes a big step in the direction of making developers successful faster, specifically through a new set of generators that are now part of the core.

What are Generators?

Generators are designed to simplify and speed up the creation of ExpressionEngine templates, helping developers rapidly build and modify sites.

How are they used?

Template Generators can be used in a variety of ways. For starters, any place you see a field, field group, or channel short name with curly braces around it, you can click it to copy the necessary template code to your clipboard:

Check out the quick 30-second video below to see how the click-to-copy feature works.

In addition to this, you can use the new Template Generators section in the Template Manager, as well as the CLI (Command Line Interface), to generate templates:

What can be generated?

Generators can be used to generate code for a single field, a field group, a channel, channel forms, Structure Navigation, Pro Search, and even Member management.

Channels have been given special attention with the ability to generate listing pages, detailed single-entry pages, archive pages, category listings, RSS feeds as well as XML site maps.

Additionally, you can also generate any member management template you want.

Will the Generators work with Twig and Blade?

Support for Twig and Blade generators is nearly complete and will be available very soon for sites running Coilpack.

ExpressionEngine 7.5 is also shipping with a new config parameter that allows you to set your default template engine. When this is set, all generators will default to your chosen template language.

Can I control the generated code?

Yes, in fact there’s several ways to override template generators. The core will look in the following locations until it finds the approprate generator

  • system/user/stubs/{addon_name}/{generator_name}
    User override for specific generator stub
  • system/ee/ExpressionEngine/Addons/{addon_name}/stubs/{generator_name}
    (Core/First-Party) Addon’s path for specific generator stub
  • system/user/addons/{addon_name}/stubs/{generator_name}
    (Third-Party) Addon’s path for specific generator stub
  • system/user/stubs
    User override for generic stub
  • system/ee/templates/stubs
    System fallback for generic stub
ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.