nodemailer-express-handlebars icon indicating copy to clipboard operation
nodemailer-express-handlebars copied to clipboard

There is no default template

Open titsex opened this issue 1 year ago • 1 comments

Hello! I have a problem, the plugin is looking for main.handlebars in the root of the project, and not in the folder I specified.

The path to the views folder is specified

Error, as it tries to open the main.handlebars template in the root of the project

I can also suggest adding the possibility of disabling the mandatory default template with the defaultLayoyut: boolean parameter

titsex avatar Aug 20 '23 01:08 titsex

I'm passing viewEngine option and it's ok:

hbs({
        viewEngine: {
          extname: '.handlebars',
          layoutsDir: './templates',
          defaultLayout: './yourDefaultTemplate',
          partialsDir: './templates',
        },
}

milad2golnia avatar Jan 22 '24 14:01 milad2golnia

This is likely an issue with how you're using express-handlebars. This plugin does not have a defaultLayoyut option.

yads avatar Sep 13 '24 14:09 yads