Starts in:
2 DAYS
0 HR
23 MIN
41 SEC
Starts in:
2 D
0 H
23 M
41 S
Open Closed

Overriding the Email Confirmation Link Template #2678


User avatar
0
balessi75 created

Abp Commercial 5.1.3 / Blazor Server / EF / Non-tiered

Hi, We have a TemplateDefinitionProvider defined in our Domain project and we are attempting to override the template for the built in email confirmation link. At runtime, however, the context of the provider only has "Abp.StandardEmailTemplates.Layout" and "Abp.StandardEmailTemplates.Message" available in it's collection. In our code below, emailLayoutTemplate is always null. Is there something missing here or are we taking an incorrect approach?

public class EmailTemplateDefinitionProvider : TemplateDefinitionProvider, ITransientDependency
{
    public override void Define(ITemplateDefinitionContext context)
    {


        var emailLayoutTemplate = context.GetOrNull("Abp.Account.EmailConfirmationLink");

        if (emailLayoutTemplate == null)
        {

We are not using the Text Templating Management Module because we want to maintain one template for all tenants (each tenant has its own separate database).

Thanks as always!


2 Answer(s)
  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    We have a TemplateDefinitionProvider defined in our Domain project

    hi

    Can you try moving it into your Application.Contracts module?

  • User Avatar
    0
    balessi75 created

    We have a TemplateDefinitionProvider defined in our Domain project

    hi

    Can you try moving it into your Application.Contracts module?

    Thank you maliming, that resolved the issue!

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06