How does the `tagDetail` tag display the name, description, and other properties of a single tag?

Calendar 👁️ 63

In website content management, tags (Tag) play a multiple role in connecting content, optimizing user experience, and improving search engine visibility.A well-managed tagging system can not only help visitors quickly locate the information they are interested in, but also convey the structured information of the website content to search engines, thereby effectively improving SEO effects.tagDetailLabel, allowing you to flexibly retrieve and display detailed information of a single label.


tagDetailLabel: Dive deeper into each of your labels.

tagDetailTags are a core component of the AnQiCMS template system, specifically designed to retrieve all related data for a specific tag. Whether you want to add a brief description for each tag on the tag index page or fully display the name, image, detailed content, and associated articles of a specific tag on an independent tag detail page,tagDetailIt can provide the required data support. Its design philosophy aims to simplify template development, allowing you to implement rich and dynamic tag display functions with the least amount of code.

How to accurately obtain label information? Understand core parameters

UsetagDetailWhen labeling, you can use several key parameters to accurately control the label data you want to obtain:

  • Specify the label by ID (id):If you know the unique numeric ID of the target tag, you can directly passid="123"This form is used to accurately obtain its information.This is useful when referencing specific known tags, such as recommending a tag at the bottom of an article or calling a preset tag in a specific module.

  • Specify the tag by URL alias (token):On the tag detail page, the URL of the page usually contains the URL alias of the tag (i.e.,tokenIn this case,tagDetailTags will intelligently automatically identify the tag information on the current page, you usually do not need to specify manuallyidortokenBut if you need to get tag information based on dynamic URL aliases on other pages, you can also specify throughtoken="your-tag-alias"to specify.

  • Cross-site data call (siteId):For those who manage multiple sites on AnQiCMS,siteIdThe parameter provides the ability to call cross-site data. If you need to display tag data from other sites in the current site's template, you just need tositeId="X"(Where X is the ID of the target site) can be specified. If your AnQiCMS only manages one site, this parameter is usually omitted.


RevelationtagDetailAttributes available for the tag

BytagDetailThe tag object obtained contains a series of practical properties. You can use these properties to build various and rich tag display effects in the template:

  • Tag ID (Id)The unique number identifier of the tag in the system.

    <div>标签ID:{% tagDetail with name="Id" %}</div>
    
  • Label title (Title)The display name of the tag, which is also the main text content that users see on the front-end page.

    <h1>标签名称:{% tagDetail with name="Title" %}</h1>
    
  • Label link (Link): The URL address of the tag detail page. It is the key to building clickable tag navigation, breadcrumb navigation, or related links.

    <a href="{% tagDetail with name="Link" %}">了解更多关于 {% tagDetail with name="Title" %}</a>
    
  • Tag description (Description)This is a brief description of the label content. This attribute is usually used for the Meta Description on the label detail page, which is crucial for search engine optimization (SEO).

    <p>简介:{% tagDetail with name="Description" %}</p>
    
  • Label index letter (FirstLetter): The first letter of the tag name. It is very useful in scenarios where tag lists need to be sorted in alphabetical order.

    <span>首字母:{% tagDetail with name="FirstLetter" %}</span>
    
  • Tag category ID (CategoryId): If the tag is associated with a content category, this attribute will display the ID of the category it belongs to. You can combinecategoryDetailthe tag to get more information about the category.

    {% set currentTagCategoryId = tagDetail with name="CategoryId" %}
    {% if currentTagCategoryId %}
        <p>所属分类:{% categoryDetail with name="Title" id=currentTagCategoryId %}</p>
    {% endif %}
    
  • Tag content (Content): Detailed information about the tag or

Related articles

How does the AnQiCMS `tagList` tag display all associated tags of the document?

## Easily display document-related tags: In-depth analysis of AnQiCMS's `tagList` tag In content management, tags (Tag) play a crucial role.They can not only help us better organize content and improve the internal link structure of the website, but also play a huge role in search engine optimization (SEO), making it easier for users and search engines to find relevant information.AnQiCMS has fully considered this point and provided a flexible and powerful tag management system.Among, `tagList`

2025-11-07

How does the `pageDetail` tag display the detailed content of a single page, such as the 'About Us' page?

In Anqi CMS, single pages (such as "About UsTo present the detailed content of these single pages on the website frontend, we will use a very core and practical template tag——`pageDetail`.This tag helps us accurately extract and display various information on a specified single page, ensuring the flexibility and accuracy of content presentation.

2025-11-07

How does the `pageList` tag display all the titles and links of the individual pages of the website?

In Anqi CMS, using the `pageList` tag to display the titles and links of all single pages is a very common and practical need in website layout and navigation settings.Whether it is used for website footer navigation, sidebar link list, or building a simple HTML site map, the `pageList` tag can help us efficiently achieve these functions. ### Understanding AnQi CMS Single Page Firstly, let's briefly review the "single page" in AnQi CMS.In the Anqi CMS backend management, there is a special "Page Resources" module

2025-11-07

How to retrieve and display detailed information such as description, Logo, etc. for a specific category using the `categoryDetail` tag?

In AnQiCMS template development, obtaining and displaying detailed category information is a key step in building rich and user-friendly pages.The `categoryDetail` tag was created for this purpose, it can help you easily retrieve the description, Logo, custom fields, and other detailed content of a specific category at any location on the page.### `categoryDetail` tag's core function The main function of the `categoryDetail` tag is to obtain detailed data of a single category

2025-11-07

How to get and display the associated document list based on a specific tag of `tagDataList`?

In AnQi CMS, tags are not just an auxiliary tool for content management, but also a powerful tool for connecting different thematic content, enhancing the internal link structure of the website, and optimizing the user experience.When you want to display a list of all documents related to a specific tag on a specific page of the website, such as a special page, a tag cloud page, or the sidebar of a specific article, the `tagDataList` tag is your best choice.

2025-11-07

How to flexibly construct and display the top, side, or bottom navigation menu of a website using the `navList` tag?

When building a fully functional website, a clear and intuitive navigation menu is undoubtedly one of the core elements of user experience.AnQiCMS provides a powerful and flexible `navList` tag, allowing users to easily create and manage the top, side, or bottom navigation menus of the website, meeting different layout and content display needs. ### `navList` Tag Basic Usage The `navList` tag is a key tool in the AnQiCMS template engine used to obtain the website navigation list.

2025-11-07

How to generate and display a clear hierarchical breadcrumb navigation on the AnQiCMS page using the `breadcrumb` tag?

In website operations, a clear navigation path is crucial for improving user experience and search engine optimization (SEO).When we browse websites, a concise and clear path can help us quickly locate and understand our current position.

2025-11-07

How to call and display the website name, Logo, filing number, and other global configuration information using the `system` tag?

Building a website in Anqi CMS, the basic information of the page, such as the website name, Logo, filing number, copyright information, etc., is an important element in forming the overall style and professionalism of the website.This information often needs to be managed uniformly and flexibly called at various corners of the website.AnQi CMS provides the `system` tag, which is like a central console that allows us to easily call and display these global configuration information.

2025-11-07