Join array elements into a string with a specified separator

How to concatenate an array into a string with a specified separator in the AnQi CMS template?

joinThe filter can concatenate the values of an array into a new string with a specified separator. If the original object is a string, the separator will be added between characters.

Usage Instructions

joinHow to use the filter:

{{ obj|join:"拼接符" }}

For example, if you need to split["splits", "the", "string", "安企CMS"]Concatenate into a string, it can be written like this:

{% set values = "splits the string 安企CMS"|fields %}
{{ values|join:", " }}
# 显示结果
splits, the, string, 安企CMS

Here is an example demonstration

{{ values|join:", " }}
# 显示结果
splits, the, string, 安企CMS
{{ "安企内容管理系统"|join:", " }}
# 显示结果
安, 企, 内, 容, 管, 理, 系, 统