Introduction

Email templates play a crucial role in communicating with your users. Aikeedo provides a set of pre-designed templates that you can easily customize to match your brand and messaging needs.

Template Location

All email templates are stored in the /resources/emails directory of your Aikeedo installation. This centralized location makes it easy to manage and update your email content.

Available Templates

Aikeedo comes with the following essential templates:

Core Templates

  • layout.twig: Base layout template that provides a consistent design for all emails
  • export.twig: Template for admin exported data
  • password-reset.twig: Sent when a user requests a password reset
  • verify-email.twig: Used for email verification processes
  • welcome.twig: Sent to new users upon registration
  • workspace-invitation.twig: Used when inviting users to join a workspace

All email templates extend layout.twig, which serves as the base layout template providing consistent styling across all emails.

Multilingual Support

Aikeedo supports multilingual email templates through a directory-based structure.

Setting Up Multilingual Templates

  1. Create a directory in /resources/emails that matches your locale string from locale.json

    # Example for Czech language
    /resources/emails/cs-CZ/
    
  2. Duplicate the template files into the locale-specific directory

    /resources/emails/cs-CZ/welcome.twig
    /resources/emails/cs-CZ/verify-email.twig
    # ... other templates
    
  3. Translate the content in the duplicated templates

The layout.twig file in the root directory serves as the default layout for all languages. While you can create language-specific versions of layout.twig, this is optional as the default layout is typically suitable for all languages.

Template Fallback

  • Templates in the root /resources/emails directory serve as fallbacks
  • If a localized template isn’t found, the system will use the corresponding template from the root directory

Even if you only use English, it’s highly recommended to:

  1. Create an en-US directory
  2. Duplicate your customized templates there This prevents your customizations from being overwritten during updates.

Customizing Templates

You have the flexibility to edit these templates to align with your brand voice and specific needs:

  1. Navigate to the appropriate language directory (or create one)
  2. Copy the template you want to customize from the root directory
  3. Make your changes while keeping the Twig template syntax intact
  4. Save the file

After editing any email template, you must clear the app cache for the changes to take effect. This ensures that Aikeedo uses the most up-to-date version of your templates.

Template Format

Email templates in Aikeedo use the Twig templating engine. If you’re new to Twig, you can find more information in the Twig documentation.

Best Practices

When customizing email templates:

  • Keep your messaging clear and concise
  • Use a consistent tone that matches your brand voice
  • Test your emails across different email clients
  • Include all necessary information without overwhelming the recipient
  • Maintain separate language directories for better organization
  • Always backup your customized templates before updates

For more information on setting up and configuring email in your Aikeedo application, check out these related guides: