Link the array into strings according to the specified splice characters

How to link arrays into strings according to specified splicing characters in Anqi CMS template?

joinThe 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

joinHow to use filters:

{{ obj|join:"Split Character" }}

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 Anqi CMS"|fields %}
{{ values|join:", " }}
# Show results
splits, the, string, Anqi CMS

Sample Demo

{{ values|join:", " }}
# Show results
splits, the, string, Anqi CMS
{{ "An Enterprise Content Management System"|join:", " }}
# Display results
An Enterprise, content, management, management, system,