幸好,对于使用安企CMS的朋友们来说,我们有一个强大且实用的工具,能够彻底解决这一烦恼——那就是全站内容关键词或链接的批量替换功能。This feature is designed with great care, aiming to help us maintain the real-time updates and consistency of website content in the most effortless way.

Anqi CMS Overview of Full Site Content Batch Replacement Function

The core value of this feature lies in its ability to 'one-click replace keywords or links throughout the site', achieving batch updates of content, thereby greatly enhancing operational efficiency and allowing us to respond more calmly to changes in content strategy or URL adjustments.

Want to experience this efficient function? The operation path is also intuitive.Log in to the CMS backend, find the "Content ManagementAt the top of the document list page, you will see a button named "Document Keyword Replacement".Click it, we can enter the batch replacement settings interface.

Flexible definition of replacement rules: from simple text to complex patterns

After entering the replacement interface, you will see a very clear area for setting replacement rules.Here we can define the 'Find content' and 'Replace with' fields to specify the old content to be replaced and the new content to be replaced with.

For example, if your company name is changed from “Old Brand” to “New Brand”, just enter “Old Brand” in the “Search for” field and “New Brand” in the “Replace with” field, and the system will help you update all brand names involved in the entire site in bulk.

Similarly, if you need to update the internal link of a product page, such as from/old-product.htmlto update to/new-product.htmlEnglish translation: , you can also set it directly here, the system will intelligently replace all matching link addresses.This method is very convenient for simple, direct text or link replacement scenarios, and there are almost no barriers to operation.

Advanced Application: Using regular expressions for precise replacement

However, the need for website content replacement goes beyond this.Sometimes, we need to handle more complex pattern matching, such as batch updating all phone numbers, email addresses, or dates with a specific format.This is when the powerful regular expression (Regex) support of Anqi CMS comes into play.

In the replacement rules, if your search content is{begin with}End, ACP will recognize it as a regular expression.This means you can use powerful pattern matching rules, not just fixed strings.2023-01-01and the date format is01/01/2023@example.comor update all the email addresses of@new-domain.comEnglish translation: ,Regular expressions can be easily implemented.

The system also has some commonly used regular expressions built-in, convenient for us to quickly call, for example{邮箱地址}/{日期}/{时间}/{电话号码}/{QQ号}/{微信号}/{网址}These built-in rules greatly simplify the setup process for complex replacements, simply select the corresponding built-in rule and define the replacement content.

The execution time of the replacement

It is worth noting that the batch replacement function of Anqi CMS will automatically execute the replacement when "publishing articlesThis means that the replacement rules you set will be automatically applied when content is published or updated, ensuring that the latest and most accurate information is displayed on the website.

Common Questions (FAQ)

1. What types of content will the batch replacement feature affect?This feature is a site-wide setting, it mainly applies to all documents under 'Content Management' on the backend (including articles, products, and other custom models' content).Any content that can be edited in a text editor, as well as some system fields, may be affected by the batch replacement rule.

2. Does the batch replacement feature support a preview? Can you undo the replacement if it's wrong?The batch replacement feature of Anqi CMS currently does not have a direct 'replacement preview' or 'one-click undo' mechanism.Therefore, when using this feature, especially when dealing with complex replacements involving regular expressions, we strongly recommend that you test on a small amount of non-critical content before performing a full-site replacement to ensure the replacement effect meets your expectations.At the same time, regularly backing up the website database is a very good habit, in case any unpredictable errors occur, it can be recovered in time.

Can I set multiple replacement rules to take effect at the same time?Yes, you can set multiple replacement rules.The system will match and replace according to the order of the rules you add.This means you can set independent replacement logic for different keywords or links, and apply all rules in one operation to achieve more complex batch update needs.