Trying to Register a Partial Using Handlebars.RegisterTemplate("content",content); and getting the error HandlebarsDotNet.HandlebarsRuntimeException: Referenced partial name content could not be resolved
My Code
var handlebars = Handlebars.Create();
handlebars.Configuration.UseJson();
string email_skeleton = File.ReadAllText($"{AppContext.BaseDirectory}/templates/EmailSkeleton.html");
Handlebars.RegisterTemplate("content",content);
var template = handlebars.Compile(email_skeleton);
string temp = template(objects);
return temp;
<div style="padding-bottom: 30px"><span>Dear {{user.name}}</span></div> <div style="padding-bottom:30px"><span>The following Objective {{obj.objective_name}} has been createed</span></div> <div style="padding-bottom:30px"><span>You Can View the Created Objective in the following Link:</span></div> <div style="padding-bottom: 40px; text-align:center;"></div>
Stuff I tried
added the partial inside a block {{#test}}{{/test}} resulted in a empty content and added test as an object
Ive read in the issues about the partial block {{#>content}}ites empty{{/content}} but this didnt work either it failes to the content inside the block
Trying to Register a Partial Using
Handlebars.RegisterTemplate("content",content);
and getting the errorHandlebarsDotNet.HandlebarsRuntimeException: Referenced partial name content could not be resolved
My Code
email_skeleton
content
Stuff I tried
{{#test}}{{/test}}
resulted in a empty content and added test as an object{{#>content}}ites empty{{/content}}
but this didnt work either it failes to the content inside the block