Security BLOG

AnQiCMS Help Document and User Guide

How does the `add` filter implement flexible connection of text content?

In the Anqi CMS template world, we often need to dynamically combine different content blocks or data, whether it is the sum of numbers or the concatenation of text.At this time, the `add` filter acts as a flexible bridge, helping us easily achieve content concatenation, making the website display more vivid and personalized. ### Deep Understanding of `add` Filter: The Bridge Between Text and Data The `add` filter is a very practical feature in the Anqi CMS template engine, whose core function is to perform addition of numbers and concatenation of strings.It lies in its intelligent processing style

📅 November 8, 2025 👁️ 64

How to format numbers or variables into a specified string format: common applications of the `stringformat` filter?

In the template development of Anqi CMS, we often need to display various data obtained from the background in a specific and beautiful format to website visitors.Whether it is the price of goods, the reading volume of articles, or the balance of users' points, the original presentation of data may not always be ideal.This is when the `stringformat` filter becomes a very useful tool.The `stringformat` filter helps us to format numbers, variables, and even more complex structures according to the predefined string pattern and output them.In short

📅 November 8, 2025 👁️ 63

`trim`, `trimLeft`, `trimRight` filters specific usage scenarios and differences in AnQiCMS templates?

In AnQiCMS template development, handling and optimizing the display of page content is one of the daily tasks.We often need to process the data obtained from the backend to ensure that it is neat and meets expectations on the frontend.Among them, the cleaning of strings, especially the removal of redundant whitespace characters or specific characters, is a key factor in improving content quality and user experience.The AnQiCMS template system provides several very practical filters: `trim`, `trimLeft`, and `trimRight`.They each have their own unique uses and application scenarios.

📅 November 8, 2025 👁️ 57

Remove extra spaces or specific characters from a string, which filter should be used first (`cut` or `trim`)?

In the template world of Anqi CMS, we often need to clean and format strings, such as removing extra spaces from user input or dealing with specific symbols mixed in with imported content from external sources.At this point, the `cut` and `trim` filters have become our reliable assistants.Although they can all 'remove characters', their working methods and applicable scenarios are fundamentally different.Understanding the difference between these two can help us handle content more efficiently and accurately, making the website display more professional and tidy.

📅 November 8, 2025 👁️ 71

How to replace a specific keyword with another in AnQiCMS template?

In the flexible template system of AnQiCMS, dynamic content processing is an indispensable part of daily operation.Sometimes, we may need to replace a specific keyword in a string when displaying content, such as displaying a brand name uniformly or adjusting the presentation of certain text without modifying the original data.AnQiCMS's template engine provides a concise and efficient method to complete this task, among which the `replace` filter is our powerful assistant.###

📅 November 8, 2025 👁️ 59

What is the role of the `index` filter in processing string searches?

In the AnQiCMS template world, efficiently processing and displaying content is the core.Whether it is to dynamically adjust the page display based on user input or quickly locate key information in complex text, mastering the template function can greatly improve the operation efficiency of your website content.Today, let's delve into a very practical tool for string searching—the `index` filter.### `index` filter: 'Locate Expert' string Imagine you have a long article content or a list with multiple tags

📅 November 8, 2025 👁️ 67

How to get a specific digit from a number: Advanced usage of the `get_digit` filter in AnQiCMS template?

In AnQiCMS template development, flexible handling and displaying data is the key to enhancing website functionality and user experience.When faced with a sequence of numbers, such as product numbers, order numbers, or some kind of identification code, sometimes we do not need the entire number, but rather a specific digit at a certain position.At this time, the `get_digit` filter has become a very practical tool.It can help us extract the required part from the numbers accurately, providing more possibilities for the dynamic display of templates and logical judgment.

📅 November 8, 2025 👁️ 63

Template content shows: How does the `truncatewords` filter truncate text by word count?

In the presentation of website content, we often need to condense lengthy text information to meet different layout requirements, such as displaying article summaries on list pages, brief descriptions on product cards, etc.This not only makes the page look neater, but also helps visitors quickly grasp the core information.AnQiCMS provides flexible template filters for this type of need, where the `truncatewords` filter is your powerful assistant for truncating text by word count.### A clever and concise summary, making the content clear at a glance

📅 November 8, 2025 👁️ 66

How to safely truncate the article content using the `truncatechars_html` filter without destroying the HTML structure for website SEO?

In website operation, we often need to display the concise content of articles in article lists, search results summaries, or social media shares.This concise content should not only attract users' attention, but also ensure that the complex HTML structure behind it is not damaged, in order to avoid affecting the layout and user experience.For search engine optimization (SEO), a clean and effective code structure is crucial. AnQiCMS (AnQiCMS) is an enterprise-level content management system developed based on the Go programming language, deeply understanding the pain points and needs of website operation.It not only provides multi-site management, a flexible content model

📅 November 8, 2025 👁️ 65

Array concatenation into a string: Application scenarios of the `join` filter in AnQiCMS templates?

In website content management, we often encounter the need to display a set of data, such as multiple tags, multiple image URLs, or custom multiple-choice content, in a unified string format.AnQiCMS (AnQiCMS) boasts its efficient architecture based on the Go language and a flexible template engine similar to Django, providing great convenience for content display.Today, let's delve deeper into a very practical tool for handling such needs - the `join` filter.What is the `join` filter? In the AnQi CMS template world

📅 November 8, 2025 👁️ 58