How to create, manage and call document tags in AnQiCMS

Calendar 👁️ 66

As an experienced website operator for AnQi CMS, I am well aware of the importance of tags in content management and user experience.Tags can not only help us better organize content, improve the SEO performance of the website, but also guide users to discover more interesting information.Next, I will introduce how to create, manage, and call document tags in AnQiCMS to help you operate your website.

The role and value of tags in AnQiCMS

In the AnQiCMS content management system, tags are a core feature that provides a flexible supplement for content classification.Different from traditional hierarchical classification, tags can cross different categories and content models, associating content with similar themes or attributes.For example, an article about "SEO optimization techniques" can be tagged with "SEO", "website optimization", "content marketing", and many other tags. These tags can effectively improve the discoverability of the content, help users quickly locate related topics, and also provide more rich semantic information for search engines, thus optimizing the SEO effect of the website.Since version v2.1.0, AnQiCMS has added the Tag label feature for articles and products, greatly enriching the possibilities of content management and display.

Create and edit document tags

AnQiCMS provides two main ways to create tags: in real-time during the document publishing process, or through the tag management feature in the background for centralized creation and editing.

When you create or edit articles, products, and other documents, you will find the "Tag label" field.You can add one or more tags to the current document here.AnQiCMS allows you to select existing tags in the system, or you can directly enter new tag text, then press the Enter key to quickly create a new tag and associate it with the current document.This convenient operation method allows content creators to set tags immediately based on the document content.

In addition to adding at the time of document publication, AnQiCMS also provides a dedicated "document tag" management interface for you to centrally manage all tags.In this interface, you can perform operations such as adding, editing, and deleting tags.Each label includes multiple configurable fields to meet the fine-grained operation requirements.This includes the 'label name', which is the display name of the label; 'index letter', used to organize labels in alphabetical order, limited to A-Z.“Custom URL”, the system will automatically generate a pinyin URL based on the tag name, and you can also manually modify it, but make sure it is unique throughout the site, and it can only contain letters, numbers, and underscores;SEO titles

Tag management and features

The AnQiCMS tag management system has high flexibility and independence.One of its most important features is that This cross-model, cross-category association ability makes the tag a powerful content aggregation tool, able to break through the boundaries of traditional classification and build a more diversified content network.

In the label management background, you can view all the created label lists at any time and edit their various properties.For example, you can change the display name of the label, update SEO information, or adjust the custom URL.When the label is no longer needed, it can also be deleted.The design of AnQiCMS aims to provide a simple and efficient tag management experience, ensuring that website operators can easily maintain and optimize the tag system.

Call document tags in the template

In AnQiCMS template design, calling label data mainly relies on a series of dedicated template tags, which are based on Django template engine syntax, allowing you to flexibly display tags and their associated content.

Invoke the tags associated with the document

On the document details page or in the document list, if you want to display the tags associated with the current document, you can usetagListTag. It allows you to get the tag list of a specific document and display it in a loop. For example:

{# 在文档详情页或其他需要展示文档标签的地方 #}
<div>
    <strong>文档标签:</strong>
    {% tagList tags with itemId=archive.Id limit="10" %} {# archive.Id 代表当前文档的ID #}
        {% for item in tags %}
            <a href="{{item.Link}}">{{item.Title}}</a>
        {% endfor %}
    {% endtagList %}
</div>

Get all tag lists

If you want to display a list of popular tags or an index of all tags in a certain area of the website (such as the sidebar, footer), you can usetagListlabel and specifyitemId="0"To obtain the label set of non-specific documents, or throughletterFilter specific initial letter labels through parameterslimitParameter control the number of displayed items.

{# 展示所有标签或热门标签(假设后台有排序逻辑或手动选择) #}
<h3>热门标签</h3>
<ul>
    {% tagList tags with limit="20" %} {# 获取前20个标签 #}
        {% for item in tags %}
            <li><a href="{{item.Link}}">{{item.Title}}</a></li>
        {% endfor %}
    {% endtagList %}
</ul>

Display detailed information of specific tags

When a user visits a tab (such as/tag/SEO.html), you may need to display the detailed information of the tab, including its name, description, SEO title, etc.tagDetailThe tag can help you get the detailed data of the current tab:

{# 在标签详情页 (tag/detail.html 或 tag/index.html) #}
<h1>{{% tagDetail with name="Title" %}}</h1>
<meta name="description" content="{{% tagDetail with name="Description" %}}">
<p>标签描述:{{% tagDetail with name="Content" %}|safe}}</p>

List all documents under a certain tag

The core function of the tab page is to display all related documents under the tag.tagDataListTags are specifically used for this purpose, it will automatically retrieve and paginate the list of all associated documents based on the ID of the current tab:

{# 在标签详情页,列出该标签下的文档 #}
<h2>“{{% tagDetail with name="Title" %}}” 相关文档</h2>
{% tagDataList archives with type="page" limit="10" %}
    {% for item in archives %}
        <div>
            <a href="{{item.Link}}">
                <h3>{{item.Title}}</h3>
                <p>{{item.Description}}</p>
            </a>
        </div>
    {% endfor %}
{% endtagDataList %}

{# 分页导航 #}
<div>
    {% pagination pages with show="5" %}
        {# 包含首页、上一页、页码、下一页、尾页等分页链接 #}
        {% if pages.FirstPage %}<a href="{{pages.FirstPage.Link}}">首页</a>{% endif %}
        {# ... 其他分页逻辑 ... #}
    {% endpagination %}
</div>

By way of the above creation, management, and invocation methods, the tag feature of AnQiCMS can help website operators build an efficient, flexible, and SEO-friendly content system, thereby better attracting and retaining users.


Frequently Asked Questions (FAQ)

How does AnQiCMS tag improve the website's SEO performance?

The tag feature of AnQiCMS supports website SEO optimization in many aspects.Firstly, each tag can be set independently in the background with its own "SEO title", "tag keywords", and "tag description", which will be crawled by search engines to enhance the relevance of the tag page.Secondly, tags support custom URLs, which can create semantic clear, SEO-friendly URL structures.In addition, tags can aggregate scattered content to form an internal link network, enhancing the overall authority and depth of the website, and helping search engines better understand the structure of the website content.

What is the difference between tags and categories, and how should they be used?

Labels and categories are both ways to organize content, but they have different focuses.Categories are typically hierarchical, with clear boundaries, used to classify content into major categories, such as 'News and Information', 'Product Introduction', etc.And the tags are flattened, more focused on describing the specific topic or attribute of the content, which can cross categories and be more flexible in association.For example, an article belongs to the 'News Information' category, but can also be tagged with 'Artificial Intelligence', 'Technology Frontier', 'Industry Analysis', and so on.When in use, core and stable content structures should be placed in categories, while refined, cross-domain topics or keywords should be set as tags to provide richer user navigation and SEO dimensions.

Can AnQiCMS tags be associated with all types of content models?

Yes, the tag design of AnQiCMS has high versatility.“Document tags are not classified and modeled”, which means that any tag you create can theoretically be associated with all content models that support tag functions such as articles, products, and pages.

Related articles

What types of custom fields are supported in the AnQiCMS content model, and how do you add them?

In the operation practice of AnQi CMS, the flexible application of content models and custom fields is the key to improving website content management efficiency and achieving personalized display.As a website operator deeply familiar with AnQiCMS features, I will elaborate on the types of custom fields supported in the content model and their addition methods, helping you fully tap into the potential of AnQiCMS. AnQi CMS is dedicated to providing highly customizable content management solutions, among which 'flexible content model' is one of its core strengths.

2025-11-06

How to perform batch keyword replacement operations for documents in AnQiCMS backend?

As a senior practitioner who is deeply engaged in CMS content operation for enterprise safety, I know how crucial it is to efficiently update and maintain content in daily website management.AnQi CMS is not only favored for its simple and efficient architecture, but also for its powerful feature set, becoming a powerful assistant for us to improve operational efficiency.Among them, the document batch keyword replacement function is particularly prominent, which can help us unify the correction of content, ensure the timeliness and accuracy of information, and greatly reduce the burden of manual editing.

2025-11-06

How to manage document categories in AnQiCMS and how to set custom fields for categories?

As a website operator who deeply understands the operation of AnQiCMS, I know the importance of content organization and personalized display for attracting and retaining users.In AnQiCMS, the management of document categories and the setting of custom fields are the core links to achieve this goal.A well-structured classification can help users quickly find the information they need, and flexible custom fields make content display more in-depth and diverse. ### Document Classification Management: Build a Clear Content Architecture In AnQiCMS, document classification is the foundation of website content organization.

2025-11-06

How to add documents and set recommended attributes, SEO titles, and scheduled publishing in AnQiCMS?

As a professional who deeply understands the operation of AnQiCMS, I know that efficient content publishing and fine SEO optimization are the key to the success of the website.AnQiCMS provides intuitive and powerful tools to help us easily manage website content.This article will provide a detailed explanation of how to add new documents in AnQiCMS, focusing on how to set recommended properties, SEO titles, and scheduled publishing features to ensure your content reaches the target audience accurately and achieves better search engine performance.

2025-11-06

How to upload and categorize images and videos in AnQiCMS page resource management?

As a long-term website operator deeply rooted in the AnQiCMS platform, I fully understand the importance of high-quality content and efficient management for the success of the website.In AnQiCMS, properly manage your image and video resources, not only can it make your content more colorful and rich, but also greatly improve the operation efficiency.Next, I will introduce to you in detail how to upload and categorize your images and videos in the page resource management module of AnQiCMS.

2025-11-06

How to create, edit, and set custom URLs and templates for AnQiCMS single-page management?

As an experienced website operator who deeply understands the operation of AnQiCMS, I fully understand the importance of efficient website content management, especially for single pages that carry the corporate image, service introduction, or contact information.The AnQi CMS provides intuitive and flexible tools for single-page management, allowing you to easily create, edit, and personalize the URLs and templates of these pages to meet the unique needs of your website.

2025-11-06

What features does the AnQiCMS backend global settings include, and how to customize parameters?

As a senior security CMS website operator, I know the importance of the background global settings.It is not only the 'brain' of the website, determining the overall performance and operational efficiency of the website, but also the foundation for us to achieve refined content management and optimization.With a proficient grasp and flexible application of these settings, we can ensure the stability and efficiency of the website and quickly adjust strategies based on market and user needs.This article will discuss in detail the core functions included in the Anqi CMS background global settings, as well as how to effectively customize parameters to meet the unique needs of our website.

2025-11-06

How to set the download, link filtering, and webp format conversion for content images on AnQiCMS?

As an experienced CMS website operation personnel, I am well aware of the core position of content images in website operation.The quality, loading speed, and management methods of images directly affect user experience and search engine optimization effects.AnQiCMS provides us with powerful and flexible image processing capabilities, especially in image downloading, external link filtering, and format conversion, which can help us efficiently optimize the website's image resources.

2025-11-06