Import Liquid Map into set-body #76
-
I managed to get a working solution to create a simple map using the toolkit. However, I would like to set-body from a liquid template file, has anyone achieved this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hello @WarrenKinley! Thank you using toolkit! I will try to help you here. If I understand correctly, you have a file which contains a body. This file contains a liquid template. What you want to achieve is to paste the file as a content for the policy in similar manner as below context.SetBody(File.ReadAllText("body.liquid"), new SetBodyConfig() { Template = "liquid" }); Currently, compiler does not support loading external files. You need to copy and paste the value in the policy itself. e.g. context.SetBody(
"""
Your liquid template
""", new SetBodyConfig {
Template = "liquid",
}); I think, this is a great idea to create an improvement to the compiler. |
Beta Was this translation helpful? Give feedback.
Hello @WarrenKinley! Thank you using toolkit! I will try to help you here.
If I understand correctly, you have a file which contains a body. This file contains a liquid template. What you want to achieve is to paste the file as a content for the policy in similar manner as below
Currently, compiler does not support loading external files. You need to copy and paste the value in the policy itself. e.g.
I think, this is a great idea to create an improvement to the compiler.