How to obtain and display the `Tag` information of an article in Json-LD?

Calendar 👁️ 87

As an experienced website operations expert, I am well aware of the importance of structured data (Json-LD) in modern search engine optimization.It can help search engines understand web content more accurately, thereby improving the display effect of the website in search results.TagInformation into Json-LD, enhancing your content marketing strategy to the next level.

Deeply understand the Tag function of AnQi CMS and the value of Json-LD.

In AnQi CMS,TagTags are an important tool for organizing and categorizing content.It is not only a valid supplement to article classification, but also a key entry for users to quickly search and find related content.By adding precise tags to articles, we can more finely depict the article theme, improve user experience, and provide richer contextual information for search engines, which is greatly beneficial for enhancing the professionalism and user stickiness of the website.

And Json-LD, as a recommended structured data format, its core value lies in its ability to tell search engines about your web content in a standardized language.When we embed the article's Tag information into Json-LD, it is as if we are delivering a precise 'content summary' to the search engine, directly telling it the key theme of the article.This helps to improve the visibility of the article in search results, and even has the opportunity to stand out in rich media search results, bringing more high-quality traffic to the website.

However, to present the carefully managed Tag data from the Anqi CMS backend in a JSON-LD format that conforms to Schema.org standards, this involves some practical tips and strategies.

Get the article Tag information: Using AnQi CMS template tags

To display the Tag of the article in Json-LD, we first need to accurately obtain all the Tags associated with the current article in the article detail page template. AnQi CMS provides a very convenient template tag ——tagList.

tagListTags are used to obtain the Tag list of articles. On the article detail page (usuallydetail.htmlsuch template files), we can usually directly access the current article'sarchiveAn object that contains various details of the article, including itsId. By using the article'sIdpass totagListlabel'sitemIdparameters, we can easily retrieve all the tags related to the article.

For example, in your article detail template, you can use it like thistagListTo get all the tags of the current article:

{% tagList articleTags with itemId=archive.Id %}
    {# 在这里,articleTags变量将包含当前文章的所有Tag对象 #}
{% endtagList %}

Here, articleTagsis an array that contains multiple Tag objects. Each Tag object usually includesId/Title(label name),Link(Tag link) and other fields. The most commonly needed in Json-LD isTitlewhich is the text content of the tag.

Integrate Tag information into Json-LD: Custom Json-LD tag

AnQi CMS providesjsonLdCustom call tag, allowing us to more flexibly control the structured data on the page.The cleverness of this tag lies in the fact that it allows you to define Json-LD content within it, and Anqicms will automatically merge it with the default Json-LD data generated by the system.If your custom field conflicts with the default field, the custom content will take precedence over the default value.

In the Json-LD ofArticleThere is usually one in the (article) SchemakeywordsThe attribute is used to list the key topics of the article. This attribute is very suitable for storing article Tag information, as it accepts an array of strings as its value.

Our strategy is:

  1. First, utilizetagListGet all the tags of the article.
  2. Then, injsonLdthe tag, through a loop to traversearticleTagsto each tag'sTitleExtract and format it into an array in Json-LD format.

This is a complete example of fetching and displaying article Tag to Json-LD in the AnQi CMS article detail page template

Related articles

How to add or extend Json-LD structured data for AnQiCMS's custom content model?

As an experienced website operations expert, I fully understand that in today's content-oriented era, it is particularly important to stand out among our high-quality content in search engines.Structured data, especially Json-LD, is one of the key tools for achieving this goal.It can help search engines better understand our web page content, thereby improving the display effect in search results, which is what we often call "Rich Media Search Results (Rich Snippets)."}AnQiCMS as an enterprise-level content management system based on the Go language

2025-11-06

Does the `Json-LD` custom tag support fetching data from the `diy` custom content tag?

As an experienced website operations expert, I am well aware of the importance of structured data, especially Json-LD, in the context of increasingly refined search engine optimization (SEO) and its impact on the visibility and rich presentation of website content.AnQiCMS (AnQiCMS) as an efficient and flexible content management system naturally also provides us with powerful tools to achieve this goal.

2025-11-06

How to use the `for` loop tag to generate list or array data in Json-LD (such as comment list)?

Hello everyone, website operators and partners!As an expert with many years of experience in website operation, I am well aware that how to make the website content stand out and be better understood and displayed by search engines is a crucial part of our daily work.AnQiCMS (AnQiCMS) with its powerful functions and flexible customization provides us with many conveniences.

2025-11-06

Does AnQiCMS's pseudostatic rules affect the generation of link addresses in Json-LD?

As an experienced website operation expert, I know that the SEO performance of a website is the foundation of its success.In this increasingly important era of digital content marketing, the correct use of URL structure, static page configuration, and structured data (such as Json-LD) is all affecting how search engines understand and rank website content.TodayThe answer is affirmative, and this impact is positive and crucial

2025-11-06

How to avoid common JSON syntax errors when customizing Json-LD?

As an experienced website operations expert, I know the core status of structured data (Schema Markup), especially Json-LD, in current search engine optimization.AnQiCMS (AnQiCMS) provides users with powerful and flexible content management capabilities while also fully considering the needs of SEO, including built-in rich SEO tools, among which is support for Json-LD.

2025-11-06

How is the loading order of Json-LD in AnQiCMS template? Will it affect the page rendering speed?

As an experienced website operations expert, I have a deep understanding of the powerful functions of AnQiCMS (AnQiCMS) and its excellent performance in content operations.Today, let's talk about an important and often misunderstood topic: the loading order of Json-LD in AnQiCMS templates and whether it will affect the page rendering speed. ### Json-LD in the elegant loading journey of AnQiCMS template First, let's clarify the positioning of Json-LD.It is a lightweight data format based on JSON

2025-11-06

How to embed Breadcrumb navigation (`BreadcrumbList`) structured data in Json-LD?

## Breadcrumb navigation (BreadcrumbList) structured data embedded in Json-LD: AnQiCMS Practice Guide As an experienced website operations expert, I am well aware of the importance of structured data in modern SEO optimization.It not only helps search engines better understand the content of the page, but also has the opportunity to appear in search results with

2025-11-06

How to use the information in the AnQiCMS backend settings to add `Organization` or `WebSite` types to Json-LD?

As an experienced website operation expert, I am well aware of the importance of structured data for a website's performance in search engines.Json-LD is the mainstream way to implement structured data, which can help search engines better understand website content, thereby enhancing the display opportunities of websites in search results, such as obtaining rich search results (Rich Snippets).

2025-11-06