Security BLOG

AnQiCMS Help Document and User Guide

What is the final concatenation result when one operand of the `add` filter is a number and the other is a string that cannot be converted to a number?

AnQi CMS is an enterprise-level content management system developed based on the Go language, dedicated to providing users with efficient and customizable content management solutions.In daily content operation and template development, we often use various template tags and filters to process data, where the `add` filter is a very practical feature that can help us conveniently perform numerical addition or string concatenation.However, when operands of mixed types are involved, the logic of their behavior becomes particularly important.

Calendar date 2025-11-07 👁️ 64

How to use the `add` filter in a loop to implement alternating row colors or dynamically concatenate different CSS class names?

In modern web design, the visual presentation of list content has an important impact on user experience.Whether it is an article list, product display, or comment section, by giving list items different styles, such as alternating row colors or applying different class names based on specific conditions, it can significantly improve the readability and aesthetics of the page.AnQiCMS is a powerful template engine that provides flexible tools to meet these dynamic style requirements, where the `for` loop's `cycle` tag and `add` filter are our reliable assistants.###

Calendar date 2025-11-07 👁️ 60

The `add` filter performs mathematical calculations in the AnQiCMS template, what is the difference from the arithmetic operation tag in `tag-calc.md`?

During the template development process of AnQiCMS, we often encounter scenarios where numerical calculations or logical judgments are required.The system provides us with various processing methods, among which the `add` filter and the arithmetic operation capabilities introduced in `tag-calc.md` are two commonly used tools.Although they all involve numerical processing, they have significant differences in functional positioning, usage, and complexity.First, let's understand the `add` filter.As the name implies, the `add` filter is mainly used to perform **addition operations or string concatenation**

Calendar date 2025-11-07 👁️ 52

How to use the `add` filter to dynamically add a brand name or fixed suffix to the `Title` of the page `TDK`?

In website content operation, the page's "Title", "Keywords", and "Description", which is what we often call TDK, plays a crucial role in search engine optimization (SEO).A well-structured and brand-recognizable page title that not only helps search engines better understand the page content but also attracts users' attention in search results.AnQiCMS provides a flexible template engine, allowing us to finely control these key information

Calendar date 2025-11-07 👁️ 62

When handling floating-point number addition with the `add` filter, should special attention be paid to its calculation accuracy?

When using AnQi CMS for website content management, template tags and filters are tools we often use, greatly enhancing the flexibility of content presentation.Among them, the `add` filter allows us to perform addition operations of numbers or strings in the template, which is very convenient in many scenarios.However, when it comes to adding floating-point numbers (which are decimal numbers), some users may wonder: Does the `add` filter need to pay special attention to its calculation accuracy when handling such calculations?

Calendar date 2025-11-07 👁️ 55

How to concatenate the area code and phone number in the contact (`contact` tag) using the `add` filter?

It is crucial to clearly and effectively display contact information when operating your website.AnQiCMS (AnQiCMS) with its flexible template engine and powerful tag system, allows you to easily achieve various complex display needs.Today, let's talk about a common but somewhat tricky requirement: how to concatenate the area code and phone number in the contact information using the `add` filter to make your phone number clear at a glance.Why do you need to concatenate the area code and phone number?

Calendar date 2025-11-07 👁️ 60

Can the `add` filter be used to concatenate the website name and footer copyright information obtained from the `system` tag?

In website operation, we often need to finely control the display of page content, especially those global information that needs to be repeatedly displayed throughout the website, such as the website name, footer copyright, and so on.AnQiCMS (AnQiCMS) provides powerful template tags and filters to help us flexibly handle these requirements.Today, let's talk about a very practical scenario: Can the `add` filter of AnQi CMS be used to concatenate the website name and footer copyright information obtained from the `system` tag?The answer is affirmative, and this method is both intuitive and efficient.

Calendar date 2025-11-07 👁️ 67

How to use the `add` filter in a `for` loop to dynamically generate a unique `id` or `class` attribute for list items?

In AnQi CMS template development, we often need to handle the display of dynamic lists.Whether it is an article list, product display, or other content block, dynamically generating a unique `id` or `class` attribute for each item in the list is particularly important in order to achieve finer style control, JavaScript interaction, or to ensure the uniqueness of page elements.Today, let's talk about how to cleverly use the `add` filter in the `for` loop of AnQiCMS to achieve this goal.### Understanding the demand for dynamic attribute generation Imagine that

Calendar date 2025-11-07 👁️ 58

How to use the `add` filter to build dynamic SEO-friendly URL paths in the Anqi CMS template?

In Anqi CMS template creation, flexible and SEO-friendly URL paths are the key to improving the website's search engine performance.Although AnQi CMS provides powerful pseudo-static rule configuration capabilities in the background, generating static URLs through patterns such as `/module-id.html`, but in certain specific scenarios, we may need to control or combine the local URL path more dynamically and finely within the template to meet unique business needs or marketing strategies.At this point, the `add` filter has become a very practical auxiliary tool.###

Calendar date 2025-11-07 👁️ 61

How to use the `add` filter to dynamically add 'Yuan' or a specific currency symbol after the product price?

When managing website content, especially when it involves product display, we often need to present price and other numerical information in a more user-friendly manner.单纯显示一串数字,比如 `199`,往往不够直观,如果能自动加上货币符号,比如 `199元` 或 `$199`,就能大大提升信息的可读性和专业性。AnQiCMS (AnQiCMS) with its flexible template system makes it very simple to meet such requirements, and the key to this is the clever use of the `add` filter.### Understand `add`

Calendar date 2025-11-07 👁️ 59