How to use the `moduleDetail` tag to dynamically display different content models' SEO keywords (`Keywords`) and descriptions (`Description`) in the template?

Calendar 👁️ 73

In the powerful ecosystem of AnQi CMS, the flexible content model is one of its core advantages, giving us the ability to build diverse content forms according to business needs.As an expert in website operation with many years of experience, I know that if the content is not efficiently recognized and presented accurately to the target users by search engines, its value will be greatly reduced.That is the foundation of all this, which is excellent SEO optimization.

AnQi CMS provides a variety of advanced tools in SEO, from static rules to Sitemap generation, to keyword library management, all showing its friendly design philosophy towards search engines. Today, we will delve into a crucial tag in template designmoduleDetailHow to cleverly use it, in a dynamic and efficient way to display exclusive SEO keywords for different content models (Keywords) and summary (Description),thus making our website more competitive in search engines.

InsightmoduleDetailTag: SEO business card of the content model

In AnQi CMS, the content model is the blueprint for organizing and managing various content structures (such as articles, products, cases, etc.).Each content model inherently carries specific business attributes and content scope.Therefore, setting unified and representative SEO keywords and descriptions at the content model level is the first step in achieving modular SEO management and is also a very efficient step.moduleDetailTags are born for this.

In short,moduleDetailThe role of tags is to obtainThe current page or specified content modelThe detailed information. It can not only pull the basic data such as the model name, ID, link, but more importantly, it can dynamically extract the SEO keywords we set up for the model in the background (Keywords) and summary (Description)

moduleDetailLabel's core parameters and functional fields:

While usingmoduleDetailWhen labeling, we can specify the model information to be obtained accurately using the following parameters:

  • idUsed to specify the model ID. When we are not on a specific page of a content model (such as an article detail page, a category list page), we can use this parameter to explicitly specify which model's information to retrieve.
  • token: The URL alias of the model, andidSimilar, providing another way to specify the model.
  • siteIdIn the multi-site management scenario, if you need to call the content model information of other sites, you can specify the site ID through this parameter.

And for SEO information,moduleDetailthe tag provides two fields we are concerned about:

  • Keywords: to obtain the SEO keyword list at the content model level.
  • DescriptionUsed to obtain the SEO introduction at the content model level.

The strength of these fields lies in their ability to help us achieve high flexibility in templates.Imagine if we had a "news article" model and a "product display" model, each with different keywords and descriptions. BymoduleDetailWe can dynamically display this level of SEO information without modifying the page code logic.

Dynamic display of SEO keywords (Keywords) in practice

SEO keywords are important clues for search engines to understand the theme of our web pages.To configure keywords for the content model, it means that all content belonging to the model can inherit a basic SEO information when there are no specific article or category keywords, avoiding blank or redundant information.

In the AnQi CMS backend, when we create or edit a content model, we can enter keywords highly relevant to the theme of the model in the "Model Keywords" field.For example, for the 'article model', we can set 'news, industry dynamics, in-depth analysis', and so on;For the 'product model', it may include 'latest product', 'solution', 'technical features', and so on.

In the front-end template, it is usually the page's<head>area, we can call it like this to dynamically display the model keywords:

{# 在head标签中调用,以实现动态SEO关键词 #}
<meta name="keywords" content="{% moduleDetail with name="Keywords" %}">

This concise code will automatically extract and fill the "model keywords" configured in the background when the page is loaded, based on the content model of the current page. If the page is not directly associated with a content model, or if you need to retrieve the keywords of a specific model (such as the "article model" with ID 1), you can specify it like this:

{# 获取ID为1的内容模型的关键词 #}
<meta name="keywords" content="{% moduleDetail with name="Keywords" id="1" %}">

The exquisite part of this approach lies in the fact that it provides a basic and universal SEO guarantee for the website.When a specific article or category does not set its own keywords, model-level keywords can be put to use to ensure that the page always has basic SEO metadata.

Dynamically display SEO introduction (Description) in practice

SEO introduction, although it does not directly affect ranking, it is the key to attracting users to click as the summary on the search engine results page (SERP).An attractive and precise introduction that can significantly increase click-through rate.

Similar to keywords, we can write a concise description for each model in the content model editing interface on the Anqi CMS backend, in the "Model Introduction" field.For example, the 'news article' model can be summarized as 'providing the latest industry trends and in-depth insights';The product model can be 'Discover innovative products, improve your business efficiency'.

Similarly, in the template, it is also in<head>Area, we can display the model introduction dynamically like this:

{# 在head标签中调用,以实现动态SEO简介 #}
<meta name="description" content="{% moduleDetail with name="Description" %}">

Or, if you need to specify a model:

{# 获取ID为2的内容模型的简介 #}
<meta name="description" content="{% moduleDetail with name="Description" id="2" %}">

In this way, we can ensure that each content model will have a meaningful default description in the absence of a more specific introduction.This undoubtedly greatly improves the operational efficiency for those websites with large amounts of content, requiring rapid publication, or with a relatively unified content structure.

moduleDetailThe collaborative effect with other SEO tags

Of course, the SEO strategy of a website cannot be fully covered by a single tag. In actual operation,moduleDetailTags often work in collaboration with other SEO-related tags to form a comprehensive TDK (Title, Description, Keywords) optimization system:

  • tdkTags: tdkThe tag is the core of AnQi CMS handling page-level TDK, it intelligently outputs the corresponding Title, Keywords, and Description according to the type of the current page (home page, article detail page, category list page, etc.). In most cases,tdkLabels take precedence overmoduleDetail.
  • archiveDetailandcategoryDetailTags:These tags are used to get the details of specific articles and categories, includingKeywordsandDescriptionField. When an article or category itself sets TDK information, it will override the settings at the model level because more specific information usually has higher priority.

Therefore, a sound SEO information acquisition logic is usually:

  1. Firstly, try to get the most specific TDK of the current page (such as getting the TDK of the article detail page, or getting the TDK of the category list page).
  2. If the TDK of a specific page is missing, it will fall back to the TDK of its content model (viamoduleDetaillabel retrieval).
  3. If the model TDK is also missing, it will eventually fallback to the global site TDK (viasystemortdktag to get the home page TDK).

By adopting this step-by-step strategy, we can ensure that every page of the website has the most accurate and complete SEO metadata, thereby achieving**display effects in search engines.

Summary

Of Security CMSmoduleDetailThe tag provides a powerful tool for website operators to dynamically manage SEO keywords and summaries at the content model level.It is closely integrated with the flexible content model design concept, making the SEO management of large-scale websites more efficient and intelligent.Configure the SEO information of the content model reasonably and cleverly call it in the templatemoduleDetailWe can not only improve the visibility of the website in search engines, but also provide users with clearer and more attractive search results, thereby driving more traffic and conversions.Make good use of this tag, it will be an important link to the success of your CMS website operation.


Frequently Asked Questions (FAQ)

Q1:moduleDetailDoes the tag get the Keywords and Description of the specific article?A1: No.moduleDetailThe tag gets theContent modelThe layer's Keywords and Description.For example, if you have an 'article' content model, you can set a set of general Keywords and Description for the model in the background.When you use in the templatemoduleDetailWhen it comes to it, it will pull this level of model information, rather than the Keywords and Description of a specific article. To get the SEO information of a specific article, you should usearchiveDetail.

Q2: If I set Keywords and Description for the article, category, and content model, which one will ultimately be displayed on the page?<head>?A2: In most cases, the template design of Anqi CMS follows the 'proximity principle' or 'priority principle'.The most specific SEO information is displayed first. The specific priority is usually:

  1. Article/Single Page Details:Priority is given to the Keywords and Description set for the current article/page viaarchiveDetailorpageDetail)
  2. Category list page:Display the Keywords and Description set by the current category itself first (viacategoryDetail)
  3. Content model general page (such as the model homepage) or lower priority:If the more specific page above is not set, it will fallback to display its parentContent modelSet Keywords and Description (viamoduleDetail)
  4. Site-wide default:If all levels above this are not set, it may display the default home page TDK (via the background global settings)tdkorsystemLabel). Therefore, the SEO information you set at different levels is complementary rather than completely conflicting.

Q3:moduleDetaillabel'sKeywordsandDescriptionWhere is the content configured?A3: This content is configured in the 'Content Management' -> 'Content Model' section of the Anqi CMS backend. When you edit a content model, you will find the 'Model Keywords' and 'Model Introduction' input boxes on the model configuration page, and the content you enter there will pass through.moduleDetailtags on the front end.

Related articles

Does the AnQi CMS built-in 'article model' and 'product model' allow deletion? If not, why?

## The Core Pillars of AnQi CMS: The Mystery of 'Un deletable' Articles and Product Models As an experienced website operations expert, I fully understand the importance of an efficient and stable content management system (CMS) for a corporate website.Among many excellent CMS systems, AnQiCMS (AnQiCMS) has won a good reputation among small and medium-sized enterprises, self-media operators, and multi-site management users with its high-performance architecture based on the Go language, flexible content model, and SEO-friendly features.

2025-11-07

Will deleting a content model also delete all documents and categories under it? What are the data protection measures?

AnQi CMS is an efficient and flexible enterprise-level content management system, and its 'Content Model' feature is undoubtedly one of its core highlights.It allows us to customize the content structure according to business needs, whether it's articles, products, or events, it can easily handle them.However, while using this powerful function, we will also face an important issue: how will the system handle the data under the content model when it needs to be deleted?Will it only delete the model itself, or will it 'pull the strings' and delete all associated documents and categories as well?

2025-11-07

Can the custom field of the content model be set as required? How can it be verified during the frontend document release?

Certainly, as an experienced website operation expert, I am more than happy to elaborate on the exquisite design of Anqi CMS in setting up mandatory fields for content model custom fields and front-end validation. --- ## Custom fields of AnQi CMS: Flexible definition and intelligent validation In today's increasingly diverse digital content, a flexible content management system (CMS) is crucial for enterprises and content operation teams.

2025-11-07

How to set the default options for single choice, multiple choice, and dropdown selection in custom fields?

## Fine-grained content operation: In-depth analysis of default field setting in Anqi CMS In today's rapidly changing network environment, efficient and flexible content management is the foundation for enterprises and self-media to maintain their competitiveness.AnQiCMS (AnQiCMS) leverages its high-performance architecture based on the Go language and highly customizable features to provide strong support for content operators.Among them, the flexible content model and custom field function are the key to improving the efficiency of content management and ensuring data consistency for AnQi CMS.

2025-11-07

The `moduleDetail` tag retrieves the model link (`Link`) - is it an absolute path or a relative path, and does it support customization?

## AanQi CMS `moduleDetail` tag: Is the model link path absolute or relative?The comprehensive analysis of the custom mystery As an experienced website operations expert, I am well aware that the subtle details of content presentation in every CMS system may have a profound impact on the website's SEO performance and user experience.AnQiCMS (AnQiCMS) leverages its efficient Go language genetics and enterprise-level positioning, also showing its unique strengths in URL structure management.Today, let's delve deeply into a problem that often arises in template development and content operations

2025-11-07

I want to display a specific icon or style in the template based on the content model's ID, what information can the `moduleDetail` tag provide to assist in the implementation?

The secret manual of AnQi CMS template customization: Skillfully use the `moduleDetail` tag to make different content models shine with unique charm In today's content-driven digital world, the appeal of a website does not only come from the quality of its content, but also from the exquisite form of its presentation and the smooth user experience.An enterprise CMS knows this, it endows operators with high flexibility with its powerful content model features, allowing them to create diversified content structures such as articles, products, events, etc. according to different business needs.

2025-11-07

The `moduleDetail` tag is available on non-model related pages (such as the homepage)? How to safely obtain and use model information?

AnQiCMS (AnQiCMS) provides great convenience for website operators with its flexible content model and powerful template tag system.However, in practice, we often encounter a question: whether a tag like `moduleDetail`, which is usually used to obtain information about a specific content model, is still available on pages such as the homepage of a website that is not related to the model.How can it be used safely and effectively to obtain the required model information?As an experienced website operations expert, I will take you deep into this topic.

2025-11-07

How to combine the `archiveList` tag to filter and display the document list of a specific content model based on `moduleId`?

## AnQiCMS Content Model Deep Guide: How to Use `archiveList` to Precisely Filter Document Lists As a veteran in website operation for many years, I deeply understand the importance of a flexible and efficient content management system for a corporate website.AnQiCMS with its efficient architecture based on the Go language and highly customizable features, provides us with strong support in the content management field.

2025-11-07