if-statement - 批发商店 - 如果声明不起作用
问题描述
我正在建立一个批发商店,但有多个用户组。第一个用户组rdg000141
工作正常,但在elsif
部分之后,代码停止工作。
{% if template contains 'rdg000141' or template contains 'wholesale' %}
{% if customer.tags contains 'rdg000141' and template contains 'rdg000141' %}
{{ content_for_layout }}
{% else %}
{% include 'wholesale-note' %}
{% elsif customer.tags contains 'wholesale' and template contains 'wholesale' %}
{{ content_for_layout }}
{% else %}
{% include 'rdg000141-note' %}
{% endif %}
{% else %}
{{ content_for_layout }}
{% endif %}
{% endif %}
干杯
解决方案
推荐阅读
- kubernetes - 为什么可以在持久卷上设置多个 accessModes?
- android - 如何强制camera2预览成为视频(用于测试目的)?
- java - 在Java中引入输入时如何清除控制台屏幕?
- laravel - 分页不填第一页?- Laravel 6
- javascript - 可折叠不展开
- ios - "dyld`__abort_with_payload:" 添加应用图标后在设备中运行应用时
- vue.js - 如何将数据从组件传递到外部 js 文件
- c++ - 从函数返回“T”时,“T&”是什么意思?
- python - 安排 api 请求并保存到数据框
- linux - 在 kubuntu 上,unity3d 无法选择文件菜单