在“忍者”中设置variables
我想知道如何在神庙中设置一个variables与另一个variables。 我会解释,我有一个子菜单,我想显示哪个链接是活动的。 我试过这个:
{% set active_link = {{recordtype}} -%} recordtype是给我的模板的variables。
  {{ }}告诉模板打印这个值,这不会在你想要做的expression式中工作。 相反,使用{% set %}模板标签,然后像在普通的Python代码中那样分配值。 
 {% set testing = 'it worked' %} {% set another = testing %} {{ another }} 
结果:
 it worked 
多variables分配的好缩写
 {% set label_cls, field_cls = "col-md-7", "col-md-3" %} 
就这样设置它
 {% set active_link = recordtype -%}