Can the `Json-LD` tag be used to generate structured data for a single page (`pageDetail`)?

Calendar 👁️ 97

As an experienced website operations expert, I know the key role of structured data in improving the search engine performance of a website.AnQiCMS (AnQiCMS) has always paid great attention to SEO-friendliness from the beginning of its design. Its flexible template system and tag mechanism provide us with a wide space for in-depth optimization of website content.pageDetailStructured data?”}]

The answer is affirmative, and AnQi CMS provides{% jsonLd %}tags, making this process extremely flexible and powerful.

AnQi CMS overview of support for structured data

In today's highly competitive online environment, the importance of Search Engine Optimization (SEO) is self-evident.Structured data, as a standardized way for search engines to understand web content, can help our website obtain richer search result displays (Rich Snippets), thereby attracting more clicks.

A Quiet CMS has taken full consideration of SEO-friendliness from the beginning of its design, providing many built-in SEO tools.In order to handle structured data, the AnQiCMS system is inherently equipped with the basic capability to generate structured data.<script>A label that contains some basic information about the page, such as the title, description, etc. This out-of-the-box feature is sufficient for most websites.

However, for those who wish to have more fine-grained control over structured data, or need to apply more specific schema types for specific page types (such as single-page, product detail pages, etc., such asAboutPage/ContactPageorFAQPageFor the operator, AnQi CMS provides a more advanced customization method.

Core answer: The combination of Json-LD tags with single-page websites

For single-page pages (pageDetailThis is the specific requirement of generating structured data, my answer is:Absolutely, and Anqi CMS provides a very convenient custom tag for this.{% jsonLd %}.

This tag allows us to place it anywhere in the template (usually recommended to be placed in the<head>Embed customized Json-LD structured data within. Its strength lies in the fact that you can{% jsonLd %}and{% endjsonLd %}between, write any Json-LD content that conforms to the Schema.org specification.

Moreover, if you use it in the template,{% jsonLd %}Label, and it contains fields that conflict with the system-generated Json-LD, the content you customize willoverrideThe default value.This means you have absolute control over the structured data of the page, and can accurately describe its semantics based on the specific content of a single page (such as the "About Us" page, contact information page, etc.)

in a single page (pageDetail) Obtain data to fill Json-LD

To dynamically present single-page data in Json-LD, we need to use the templates provided in AnQiCMSpageDetail.pageDetailLabels can conveniently obtain various information of the current single page, such as:

  • Id: Single page ID
  • Title: Single page title
  • Link: Single Page Link
  • Description: Single Page Overview
  • ContentSingle page content
  • LogoSingle page thumbnail large image
  • ThumbSingle page thumbnail
  • Images: Single-page slideshow group image

We can embed these throughpageDetailthe data obtained by the tag, ingeniously into{% jsonLd %}the JSON structure within the tag.

For example, if we have a single-page "About Us", and we want to mark it withWebPageorAboutPageof the Schema type, we can write the template like this:

{% jsonLd %}
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "WebPage", {# 或者使用 AboutPage, ContactPage 等更具体的类型 #}
  "headline": "{% pageDetail with name='Title' %}",
  "description": "{% pageDetail with name='Description' %}",
  "url": "{% system with name='BaseUrl' %}{% pageDetail with name='Link' %}",
  {%- pageDetail pageImages with name="Images" %}
  "image": [
    {%- for img in pageImages -%}
    "{{ img }}"{% if not forloop.Last %},{% endif %} {# 动态获取多张图片 #}
    {%- endfor -%}
  ],
  {%- endpageDetail %}
  "mainEntityOfPage": {
    "@type": "WebPage",
    "@id": "{% system with name='BaseUrl' %}{% pageDetail with name='Link' %}"
  },
  "datePublished": "{{ stampToDate(page.CreatedTime, "2006-01-02T15:04:05+08:00") }}", {# 假设单页面有创建时间 #}
  "dateModified": "{{ stampToDate(page.UpdatedTime, "2006-01-02T15:04:05+08:00") }}"  {# 假设单页面有更新时间 #}
  {# 你还可以添加更多自定义字段,例如作者信息、联系方式等 #}
}
</script>
{% endjsonLd %}

In the above example, we make use ofpageDetailThe tag dynamically extracts the title, description, link, and image list of a single page and fills them into the Json-LD structure.{% system with name='BaseUrl' %}Then tag

Related articles

How to ensure that the data is up-to-date when customizing Json-LD and avoid cache issues?

In website operation, Json-LD is a powerful structured data format that is crucial for enhancing the search engine's understanding of website content and increasing the display opportunities of the website in search results (such as rich media abstracts).AnQiCMS (AnQiCMS) takes advantage of its flexible template engine and good support for custom features, making it easy to integrate and manage Json-LD.You can directly use the `{% Ld %}` tag in the template to embed customized Json-LD code, thereby accurately describing the content of your page to search engines

2025-11-06

Does AnQiCMS support dynamic submission or updating of structured data through API?

## AnQiCMS's Json-LD structured data: In-depth analysis of API dynamic submission and updates As an experienced website operations expert, I am well aware of the core status of structured data in today's search engine optimization.Json-LD, as a lightweight and powerful structured data markup, can help search engines better understand web content, thereby enhancing the search visibility and richness of a website.

2025-11-06

How to reference the `moduleDetail` tag in Json-LD to get model information?

As an expert deeply familiar with website operations, I know that how to make our website content better understood and presented by search engines in today's information explosion is the core of gaining traffic and enhancing brand influence.While Json-LD is an important form of structured data, it is an indispensable tool for us to achieve this goal.AnQiCMS with its flexible content model and powerful template engine provides a solid foundation for us to build various types of websites.

2025-11-06

How to integrate AnQiCMS category detail information (such as category name, description) into Json-LD?

As an experienced website operations expert, I am well aware that it is crucial to understand how to make our website content better understood and presented by search engines in the increasingly fierce online environment.Structured data (JSON-LD) is a powerful tool at our disposal, helping search engines parse page information more accurately, thereby giving us the opportunity to present richer search results and attract more users' attention.

2025-11-06

How to use the `archiveParams` tag to retrieve custom fields and include them in Json-LD?

As an experienced website operation expert, I am well aware of the importance of structured data in today's search engine optimization.Make good use of structured data, not only can it help search engines better understand your content, but also helps to get richer display opportunities in search results.AnQiCMS (AnQiCMS) is a powerful and flexible content management system that provides excellent support in this regard.

2025-11-06

How to ensure the correct setting of the `@type` attribute for different page types when customizing Json-LD?

As an experienced website operations expert, I fully understand the importance of structured data (Structured Data) in modern search engine optimization (SEO).It is like a 'resume' of your website content, directly telling search engines what your page is about and what key information it contains.While Json-LD is a recommended structured data format, the correct setting of its `@type` attribute is crucial to ensure that search engines can accurately understand the core content of your page.Today, let's delve deeply into AnQiCMS (AnQiCMS)

2025-11-06

The website is closed, will Json-LD still output normally or how should it be handled?

In website operation, we often encounter situations where we need to maintain, upgrade, or even temporarily close the website.In this "closed station" state, many operators will have doubts: Will the JSON-LD structured data we have carefully configured for SEO still be output normally?How should it be handled to minimize the impact on search engine optimization (SEO) as much as possible?As an experienced website operation expert, I will combine the characteristics of AnQiCMS (AnQiCMS) to deeply analyze this issue for everyone.### Deeply understand the "shutdown" mechanism of Anqi CMS First

2025-11-06

Does Json-LD automatically add `itemprop` and other microdata tags, or only support JSON-LD?

As an experienced website operations expert, I am happy to give you a detailed explanation of AnQiCMS's support strategy for structured data, especially JSON-LD and traditional microdata tags.In today's Search Engine Optimization (SEO) environment, structured data plays a crucial role, helping search engines to accurately understand your web page content, thereby improving the visibility and display format of your website in search results.### The structured data support of AnQi CMS: Deep analysis of JSON-LD and microdata tags In content operation practice

2025-11-06