DotLiquid/Liquid access to dictionary

后端 未结 2 908
时光说笑
时光说笑 2021-02-10 00:06

I am using DotLiquid template engine and trying access dictionary value in template. I have passed to template this drop:

public class SomeDrop : Drop
{
   publi         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-10 00:40

    Just access it like MyDictionary["myKey"] or MyDictionary.TryGetValue("myKey", out result). No extra {{ }}.

提交回复
热议问题