How do i load template from a file?

40 views
Skip to first unread message

Shardul Kavale

unread,
Nov 1, 2021, 2:20:39 PM11/1/21
to dotliquid
So far I found the following function :

Template template = Template.FileSystem.ReadTemplateFile(Context c, "path_of_file");
-I don't know what Context parameter is and how i should use it. Is there any other way of doing this?         

Also how do I output the template somewhere other than console? 
//output:
Console.Write(template.Render(Hash.FromAnonymousObject(new { name = "tobi" }))); 

Thanks
Reply all
Reply to author
Forward
0 new messages