How `tagList` tags display the related Tag list of the specified document?

Calendar 👁️ 52

As an experienced website operation expert, I know that how to flexibly and effectively organize and display content in a content management system is the key to improving user experience and search engine optimization (SEO). AnQiCMS (AnQi CMS) provides many powerful functions in this aspect, and among themtagListLabels are an important bridge connecting content and enhancing discoverability. Today, let's delve deeper into how to use it in AnQiCMStagListTags, accurately display the associated tags list of the specified document.

Fine-grained content management: In AnQiCMStagListHow to efficiently display the associated tags of the specified document?

In the powerful system of AnQiCMS, content tags (Tag) play a role in linking scattered information into a thematic network.They are not just a few keywords, but also an important tool for content aggregation, user interest guidance, and internal link optimization on the website.How to clearly present these 'hidden clues' to visitors after carefully labeling the documents has become the key to enhancing the value of the website.AnQiCMS provided for thistagListLabels, it is like a content curator, which can accurately display the list of tags associated with a specific document according to your instructions.

The value of tags andtagListpositioning

On the AnQiCMS backend, we can add multiple tags to each document, which are somewhat similar to topics and provide a flexible way to associate documents of the same type together, in addition to categories. They help:

  • Users discover:Users can quickly find more content related to the same topic by clicking on the tag.
  • Content aggregation:The website can form a special page centered around tags, enhancing the depth of content.
  • SEO optimization:The tab itself can serve as a page carrying keywords, and the label links within the page build a strong internal link network, which helps search engines understand the structure and content relevance of the website, improving inclusion and ranking.

AndtagListTags, it is exactly the tool that dynamically presents these background management tag data on the website front-end page.It can not only display the current document tags on the document detail page, but also flexibly call other document or site-wide tags as needed.

tagListThe core function and parameter analysis

While usingtagListWhen labeling, we usually wrap it in{% tagList tags with ... %}and{% endtagList %}and use it withforLoop to traverse the returned tag data. It provides a series of practical parameters, allowing you to finely control the acquisition and display of tags:

  1. itemId: Specify the document's 'ID card'This istagListOne of the core parameters of the tag, especially when we want to display the tags associated with a specific document.

    • Display the tags of the current document:If we use the document detail page (such as article detail, product detail)tagListAndNot specified explicitlyitemIdIt will intelligently automatically identify and pull the tags associated with the document being viewed. This is the most common and convenient usage.
    • Display the tags of the specified document:But if we need to displaya specific documentthe tag of (not the current document), for example, a product introduction page shows a related article tag, we canitemId="文档ID"to specify accurately. For example,{% tagList tags with itemId="123" %}It will display all tags of the document with ID 123.
    • Display all tags on the site:A special but very practical usage isitemId="0". When we willitemIdis set to0then,tagListIt is no longer limited to any specific document but will listAll tags created on the entire site.This is very convenient when making tag clouds or tag index pages.
  2. limitControl the number of displayed items.This parameter is used to limit the number of tags displayed at one time. By default, if not set,tagListup to 10 tags will be displayed. You can adjust this according to the page layout and design requirements,limit="N"Specify the display of N tags, for examplelimit="5"It is also worth mentioning that it supportsoffset,limitpatterns, such aslimit="2,10"This means starting from the second tag, 10 tags are retrieved, which is very useful when fine control over the order and quantity of tag display is needed.

  3. categoryId: Filter tags by categorySometimes we may only be concerned with tags under a specific category.categoryIdThe parameter allows us to specify one or more category IDs (separated by English commas, such ascategoryId="1,2,3"Thus, only the tags associated with the documents under these categories are displayed. This helps to provide more focused tag recommendations under the category pages.

  4. letterFilter by the first letter:If your tag quantity is large and you need to sort and display them by the first letter,letterthe parameter can be used. You can set it to any letter from A-Z, for exampleletter="A",tagListIt will only return tags that start with 'A' and meet other filtering conditions.

  5. siteId: Multi-site compatibilityAnQiCMS has a very powerful multi-site management function. If you have deployed multiple sites and want to call tag data from other sites in the current site, you can usesiteId="站点ID"Specify. This parameter is usually not required in a single-site environment.

tagListThe data returned by the tag is an array object.

Related articles

How to get the link, Logo image, and document count in the `categoryList` loop?

As an experienced website operations expert, I am well aware of the importance of an efficient and flexible content management system for daily operations.AnQiCMS with its high-performance architecture based on the Go language and the friendly syntax of the Django template engine, provides us with great convenience.Today, let's explore a very practical technique in website frontend display: how to elegantly obtain the links, Logo images, and the number of documents under each category in the `categoryList` loop.

2025-11-06

how the `categoryList` tag implements nested hierarchical display of multi-level categories?

Sure, as an experienced website operations expert, I am happy to deeply analyze how to implement nested display of multi-level categories in the `categoryList` tag of AnQi CMS and transform it into an article that is easy to understand and practical. --- ## AnQi CMS `categoryList` Tag: Easily Implement Nested Display of Multi-level Categories, Making the Website Structure Clear and Orderly A clear classification system is crucial for user experience (UX) and search engine optimization (SEO) in website operations.

2025-11-06

How to get all top-level categories under a specified model for the `categoryList` tag?

Anqi CMS, as an efficient and customizable enterprise-level content management system, provides great flexibility in content organization and display.Among them, skillfully using template tags is the key to leveraging its potential.Today, let's delve into how to use the `categoryList` tag to accurately retrieve all top-level categories under a specified content model, which is crucial for building clear website navigation, content modules, or product display pages.

2025-11-06

How to create custom fields for different content models (such as articles, products) in AnQiCMS?

Good, as an experienced website operation expert, I am very willing to deeply analyze the powerful functions and actual operations of the customized fields in AnQiCMS. --- ## In AnQiCMS, create custom fields for different content models: unlock the powerful engine of personalized content In the era where content is king, the diversity and personalization of website content are key to attracting and retaining users.A remarkable content management system (CMS) should never limit you to a fixed content structure.AnQiCMS understands this way

2025-11-06

How to retrieve all documents under a specific Tag and implement pagination using `tagDataList` tag?

In the vast field of content operation, tags (Tags) play a crucial role.They can not only thematize and structure scattered content, but also guide users to explore deeply, improve the efficiency of content discovery, and enhance the overall user experience of the website.As an experienced website operations expert, I am well aware of the powerful capabilities of AnqiCMS (Anqi CMS) in label management and content display.

2025-11-06

How to use the `pageDetail` tag to get detailed content and images of a single page (such as "About Us")?

In website operation, pages like "About Us" and "Contact Us" are indispensable, as they carry important information such as corporate culture, contact information, and service introduction.How to present these carefully prepared contents efficiently and beautifully on the front end of a website is a skill that every website operator needs to master.For users using AnQiCMS, the `pageDetail` tag is the key tool to achieve this goal.

2025-11-06

How to build a multi-level website navigation menu using the `navList` tag and support dynamic display of categories or document links?

As an experienced website operations expert, I am well aware of the importance of a clear and efficient website navigation system for improving user experience, guiding content consumption, and optimizing search engine rankings (SEO), which is self-evident.In AnQiCMS (AnQiCMS) such a well-designed content management system, building flexible and variable navigation menus, and making them able to intelligently display dynamic content, is the key to operators achieving fine-grained content layout.

2025-11-06

How to use the `breadcrumb` tag in the AnQiCMS template to generate breadcrumb navigation?

As an experienced website operations expert, I know that a user-friendly and SEO-optimized website cannot do without a clear navigation structure, and breadcrumb navigation is the key link in this regard.It can not only help users understand their current location, improve the usability of the website, but also provide clear website structure signals for search engines.In AnQiCMS, integrating and using breadcrumb navigation is very simple and efficient, which is mainly due to its built-in `breadcrumb` tag. Today

2025-11-06