How to concatenate an array into a string with a specified separator in the AnQi CMS template?
join
The filter can assemble the values of the array into a new string according to the specified splice link. If the original object is a string, a splicing character will be added directly to the characters and characters.
How to use
join
How to use filters:
{{ obj|join:"拼接符" }}
For example, it is necessary to["splits", "the", "string", "安企CMS"]
If you splice it into a string, you can write it like this:
{% set values = "splits the string 安企CMS"|fields %}
{{ values|join:", " }}
# 显示结果
splits, the, string, 安企CMS
Sample Demo
{{ values|join:", " }}
# 显示结果
splits, the, string, 安企CMS
{{ "安企内容管理系统"|join:", " }}
# 显示结果
安, 企, 内, 容, 管, 理, 系, 统