I am facing this issue in c# code. While using liquid templates include
formula.
string liquidTemplateContent = System.IO.File.ReadAllText("wwwroot/template/example.liquid");
LocalFileSystem fileSys = new DotLiquid.FileSystems.LocalFileSystem("wwwroot\\template");
Template.FileSystem = fileSys;
Template template = Template.Parse(liquidTemplateContent);
In following liquid file for {% include 'function' -%}
this part, I'm facing this issue. Whenever the path coming under the error is valid path
And that _function.liquid file is also present over there.
error with path: Liquid error: Error - Illegal template path 'D:\Include Trial1\DotLiquidTest\wwwroot\template\_function.liquid'
<p>
Email: {{ employee.email }}
</p>
<p>
Phone: {{ employee.phone }}
</p>
<p>Addresses:</p>
<div>
{% include 'function' -%}
</div>
I am not sure what is missing here. I am using dotliquid NuGet package for the same.