What template codes can be edited online in the AnQiCMS backend template editing feature?

Calendar 👁️ 60

As an experienced website operations expert, I know that a successful website cannot do without flexible and variable design and efficient content presentation.The backend template editing function of AnQiCMS (AnQiCMS) is exactly designed to meet this core requirement, giving operators great freedom to directly fine-tune the "front door" of the website, without the cumbersome local development and upload process, greatly improving work efficiency.

What exactly does the AnQiCMS backend template editing function support us in modifying the template code online?In simple terms, it supports modifying almost all code files that make up the front-end interface of your website, which collectively define the visual presentation and interaction logic of the website.

The skeleton and soul of the website interface: various HTML template files

The template system of Anqi CMS uses.htmlAs the suffix of template files, and place them in a unified location/templateIn the template folder. This means that all HTML files defining the layout and content of different web pages can be modified online. This includes but is not limited to:

  1. Core page template: such as the home page of the website(index/index.htmlorindex.html) which is the first impression of the user visiting the website; the document detail page({模型table}/detail.html) defines the display method of articles or product content; as well as the document list page({模型table}/list.htmlThe arrangement of the content list is determined by.
  2. Special function page templateFor example, a single page detail page(page/detail.html) used for independent pages such as "About Us", "Contact Us"; Comment list page(comment/list.html) Online留言页(guestbook/index.html) Search results page(search/index.html) And tag-related homepage(tag/index.html) And list page(tag/list.html).
  3. System-level prompt page: Common error pages like 404 error pages(errors/404.html), 500 error pages(errors/500.html), and site closure notification pages(errors/close.html), can also be customized in terms of content and style.
  4. Public code snippets: To improve code reusability, Anqi CMS encourages extracting common modules such as page header(bash.html), footer, sidebar, navigation, and storing them inpartial/Under the directory. These "code snippets" also support online editing, ensuring the consistency of the website's global style and the convenience of maintenance.
  5. Template configuration file: Each template theme has oneconfig.jsonA file used to define the name, version, author, and other metadata of the template. Although this is not the code displayed on the page, it is also an important configuration item that can be edited online in the template package.
  6. Mobile Exclusive TemplateIf your website has adopted code adaptation or PC + mobile independent station mode, Anqi CMS also supports inmobile/The directory contains a set of independent mobile template files, which can also be edited online to provide a ** mobile user experience.

It is worth mentioning that Anqi CMS also supports custom template file names, for example, you can specify a unique one for a specific article, category, or single page..htmlTemplate, these custom template files can be modified online as long as they are in the corresponding directory.

The elements of template code: HTML, CSS, JS and AnQiCMS exclusive language

When you edit these online.htmlWhen you are handling a file, you are actually operating on a mixture of the following code:

  1. Standard HTML, CSS and JavaScriptThis is the foundation for building any web page. You can write HTML structure, embed CSS styles (whether inline, internal style sheet or through<link>Tags to include external style files) and add JavaScript scripts (whether inline or through<script>Label to reference external JS files to achieve rich visual effects and dynamic interaction.

  2. AnQiCMS template language (Django-like syntax)This is the core of AnQi CMS template, it adopts the syntax style similar to Django template engine, making the display of dynamic content intuitive and powerful.

    • Variable outputThrough double curly braces{{ 变量名 }}Output dynamic data, for example{{ archive.Title }}Used to display the article title. Variable names follow camel case naming conventions.
    • Control logic: Use.{% ... %}Tag to handle logic, for example{% if 条件 %}For conditional judgment,{% for item in 列表 %}Perform loop traversal. These logical tags usually need{% endif %}or{% endfor %}End tags follow.
    • Rich built-in tags: Anqi CMS is built-in with up to 38 commonly used tags, which are powerful tools for obtaining and displaying various types of website data. For example:
      • systemTagGet the website name, Logo, filing number, and other global system configurations.
      • contactTagGet contact information, phone number, address, and other contact information.
      • tdkTagGet the page's SEO title, keywords, and description.
      • navListTagDynamically generate the website navigation menu.
      • categoryListandcategoryDetailTagGet the category list and category details.
      • archiveListandarchiveDetailTagGet the list and details of articles/products.
      • tagListandtagDataListTagGet the tag list and associated documents.
      • commentListandguestbookTagProcess the comment and message form.
      • linkListTagGet the friendship link.
      • paginationTagCreate pagination navigation. These tags allow you to flexibly display background data on any position of the website.
    • Practical Filters (Filters): To make the data presentable on the frontend more refined, AnQiCMS also provides various filters for processing and formatting variables. For example:truncatecharsUsed to truncate a string and add an ellipsis;stampToDateUsed to format a timestamp into a readable date;safeUsed to output HTML content without escaping;addPerform concatenation of numbers or strings;replacePerform content replacement, etc.
    • Helper Tags: such asincludeUsed to include other template files to achieve modular development;extendsUsed for template inheritance, defining the common layout of the website;macroUsed to define reusable code snippets, improve efficiency.

Points to note and **practice during template editing.

Related articles

How to use AnQiCMS backend user group management and VIP system to achieve content monetization?

In today's content is king era, how to transform high-quality content into tangible profits is a core issue facing every content operator and enterprise.AnQiCMS (AnQiCMS) is an enterprise-level content management system designed specifically for content operations, providing an intuitive and efficient solution for content monetization with its flexible user group management and powerful VIP system.As an experienced website operations expert, I will take you deep into how to fully utilize these core functions of AnQiCMS to build a sustainable content monetization model.

2025-11-06

How to view and analyze the website traffic statistics and crawler monitoring function on the AnQiCMS backend?

## Mastering Data Insight: Deep Analysis of AnQiCMS Website Traffic and Spider Monitoring Function In today's digital age, a website is not just a carrier of information, but also an important battlefield for enterprises to interact with users, build brands, and even drive business growth.In order to make the website maximize its value, it is indispensable to have an accurate insight into visitor behavior and search engine trends.AnQiCMS (AnQiCMS) is a content management system designed specifically for small and medium-sized enterprises and content operation teams, fully aware of the importance of data analysis, therefore, it is built-in with powerful website traffic statistics and spider monitoring functions

2025-11-06

How to manage friend links and website comments on the AnQiCMS backend?

As an experienced website operation expert, I know that friend links and website comments are crucial for the long-term development of a website and user interaction.AnQiCMS is an efficient enterprise-level content management system that provides strong and flexible functional support in these aspects, allowing operators to easily handle it and transform it into a valuable asset of the website.Today, let's delve into how to efficiently manage these interactive elements on the AnQiCMS backend.

2025-11-06

What advanced SEO tools does AnQiCMS come with, such as Sitemap generation and Robots.txt management?

As an experienced website operations expert, I am well aware of the importance of an excellent content management system (CMS) for the SEO performance of a website.AnQiCMS (AnQiCMS) has an efficient architecture based on the Go language and deep consideration for small and medium-sized enterprises and content operation teams, showing its unique strengths in built-in SEO tools.

2025-11-06

How to quickly update website content or materials through content collection and batch import features?

As an experienced website operations expert, I know that content is the lifeline of a website, and how to efficiently and continuously inject fresh blood into the website is a challenge that every operator needs to face.Today, let us delve into the two powerful functions of AnQiCMS (AnQiCMS) - content collection and batch import, and see how they become the 'accelerator' for your website content updates.

2025-11-06

How can AnQiCMS achieve automated content operation and maintenance through scheduled tasks?

As an experienced website operation expert, I know the importance of efficiency and fine operation in the increasingly fierce digital content competition.AnQiCMS (AnQi Content Management System) as an enterprise-level CMS developed based on the Go language, with its powerful feature set, especially in terms of automated operations, really catches one's eye.Today, let's delve into how AnQiCMS cleverly uses scheduled tasks to make content operation and maintenance more intelligent and efficient.

2025-11-06

After the AnQiCMS program upgrade, if the backend interface does not change, how should I handle it?

After you upgrade AnQiCMS, you eagerly open the background, only to find that the interface is still the same, without any change?This is indeed a confusing scene. As an expert who has been deeply involved in website operations for many years, I can confidently tell you that this is a fairly common phenomenon, not a problem with AnQiCMS itself, and it usually only requires a few simple steps to solve it easily.AnQiCMS is known for its efficiency and simplicity, even the 'illusion' after the program upgrade is often due to some common operational details.We know that AnQiCMS is developed in Go language

2025-11-06

How to ensure that each AnQiCMS site's data is independent when deploying multiple sites on the same server?

In today's digital age, efficiently managing multiple websites has become a core need for many businesses and individual operators.AnQiCMS (AnQiCMS) is an enterprise-level content management system based on the Go language, providing us with an excellent solution with its high performance, ease of use, and multi-site support.How to ensure that each site's data is completely independent and not interfere with each other when you need to deploy multiple AnQiCMS sites on the same server is a crucial issue in operation and maintenance.As an experienced website operations expert, I will delve deep into this point with you

2025-11-06