Security BLOG

AnQiCMS Help Document and User Guide

How can the `dump` filter be used in the template development process for debugging and viewing the structure and value of variables?

During the development of Anqi CMS templates, we often need to handle various dynamic data.This data may come from a database, system configuration, or user input, and it is passed to the template as variables for display.However, sometimes the results displayed by the page are not what we expect-a field may be empty, the data format is incorrect, or the elements contained in a set may not be as expected.In this case, efficiently "viewing" the internal structure, type, and specific values of variables becomes the key to troubleshooting and speeding up development progress

📅 November 8, 2025 👁️ 75

How does the `divisibleby` filter determine if a number is divisible by another number, and what conditions are commonly used?

The template engine of AnQiCMS provides a powerful and flexible tool for the dynamic display of website content.Amongst them, the `divisibleby` filter is a small but effective feature that enhances the logic of templates, mainly used to determine if a number can be evenly divided by another number.Understand and make good use of this filter, which can help us achieve more intelligent effects in content presentation and page layout.### `divisibleby` filter's core function

📅 November 8, 2025 👁️ 67

How to set default values for `default` and `default_if_none` filters to avoid displaying blank when the variable is empty or `nil`?

In daily website content management, we often encounter such situations: certain variables may be empty due to unfilled content, missing data, or other reasons (or in programming terms, `nil`).If not handled, these variables may be displayed as blank areas on the front-end page, which not only affects the beauty of the page but may also confuse visitors and reduce the professionalism of the website.AnQiCMS (AnQiCMS) is well aware of this pain point

📅 November 8, 2025 👁️ 80

How do the `date` and `time` filters display `time.Time` type time values in a specified format?

In AnQi CMS template design, flexibly displaying dates and times is a key aspect of content presentation.In order to meet this refined requirement, AnQi CMS provides a series of practical time processing tools, among which the `date` and `time` filters are important functions for formatting and displaying `time.Time` type time values.

📅 November 8, 2025 👁️ 69

How to remove specified characters from any position in the string using the `cut` filter in the Anqi CMS template?

In website content operation, we often need to process strings, such as cleaning up extra characters, or standardizing the display content.AnQiCMS template engine provides a series of powerful filters to help us complete these tasks, among which the `cut` filter is a very practical tool, specifically used to remove specific characters from any position in a string.### Understanding the working principle of the `cut` filter The `cut` filter plays a very direct role in the AnQi CMS template

📅 November 8, 2025 👁️ 70

How to use the `count` filter to calculate the number of times a keyword appears in a string or array?

In website content operation, we often need to understand the frequency of certain specific keywords appearing in articles, product descriptions, and other text.This is very valuable for SEO optimization, content quality analysis, and even just data statistics.AnQi CMS provides a powerful and flexible template system, which includes a very practical `count` filter, which can help us easily achieve this goal.### Understanding the `count` filter In simple terms, `count`

📅 November 8, 2025 👁️ 68

How to determine if a string or array contains a keyword using the `contain` filter in the AnQi CMS template?

In Anqi CMS template development, we often need to dynamically adjust the display method of the page according to the different characteristics of the data.Among them, determining whether a string or array contains a certain keyword or element is a very basic but extremely common requirement.At this moment, the `contain` filter has become a powerful tool in our hands, helping us easily achieve this goal.The `contain` filter is mainly used to check if a variable (whether it is a string, array, or key-value pair and structure) contains a specific content.Its result will be a boolean value

📅 November 8, 2025 👁️ 65

How do the `center`, `ljust`, and `rjust` filters align strings to the center, left, or right at a specified length?

In the presentation of website content, the format and alignment of text often directly affect the reader's reading experience.Especially when creating AnQiCMS templates, we often encounter the need to center, left-align, or right-align titles, phrases, or data lists according to a specific length.Although most layouts rely on CSS styles, in some cases, using built-in string filters in templates can be more flexible and efficient to achieve these delicate text layouts.

📅 November 8, 2025 👁️ 62

How to use `capfirst`, `lower`, `upper`, `title` filters to perform different case conversions on English strings?

When using AnQiCMS to build and manage website content, we often need to refine the text control, especially in the presentation style of the content.English string case conversion is a common requirement, whether it is to unify style, optimize title display, or meet specific layout requirements, AnQiCMS's powerful template filter can provide a flexible solution.

📅 November 8, 2025 👁️ 63

In AnQi CMS template, how does the `add` filter implement the functionality of adding numbers or concatenating strings?

In AnQi CMS template development, we often need to perform some basic data processing, such as simple addition operations on numbers, or combining different text fragments to form new strings.To meet these common and practical needs, AnQi CMS provides a very convenient template filter——`add`.This is a compact yet powerful tool that can help us easily perform addition and string concatenation, making template logic more flexible.

📅 November 8, 2025 👁️ 70