In the powerful ecosystem of AnQi CMS, flexible content models are one of its core advantages, which enable us to build diverse content forms according to business needs.As an expert in website operation for many years, I know that no matter how rich and colorful the content is, if it cannot be efficiently identified and accurately presented to the target users by search engines, its value will be greatly reduced.And this is the foundation, which is excellent SEO optimization.

AnQi CMS provides a variety of advanced tools in the field of SEO, ranging from static rules to Sitemap generation, to keyword library management, all demonstrating its friendly design philosophy towards search engines. Today, we will delve into a tag that is crucial in template design.moduleDetailHow to cleverly use it, to dynamically and efficiently display exclusive SEO keywords for different content models,Keywords), and the introduction (Descriptionthus making our website more competitive in search engines.

InsightmoduleDetailTag: SEO business card of content model

In the AnQi CMS, the content model is the blueprint we use to organize and manage 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 it 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 details. 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 have preset for this model in the background.Keywords), and the introduction (Description).

moduleDetailThe core parameters and functional fields of the label:

When usingmoduleDetailWhen labeling, we can specify the model information to be obtained precisely through the following parameters:

  • id:Used to specify the model ID.When we are not on a specific page of a content model (such as an article detail page, category list page), we can use this parameter to explicitly specify which model's information to retrieve.
  • tokenThe URL alias of the model, withidSimilar, another way to specify a 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: used to obtain the SEO keyword list at the content model level.
  • Description:Used to obtain the SEO introduction at the content model level.

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

Dynamic display of SEO keywords (Keywords) Practice

SEO keywords are important clues for search engines to understand the theme of our web pages.Configure keywords for the content model, which means that all content belonging to this model can inherit a basic SEO information when there is a lack of specific article or category keywords, thus avoiding blank or redundant information.

In the AnQi CMS backend, when we create or edit a content model, we can enter related phrases highly relevant to the theme of the model in the 'Model Keywords' field.For the 'article model', we can set 'news, industry trends, in-depth analysis', etc.; for the 'product model', it may be 'latest products, solutions, technical features', etc.

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

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

This concise code will automatically extract and fill in the 'model keywords' configured in the background according to the content model of the current page when the page is loaded. If the page is not directly associated with a content model, or if you need to obtain the keywords of a specific model (for example, 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 specific articles or categories do not have their own keywords set, keywords at the model level can be used, ensuring that the page always has basic SEO metadata.

Dynamic display of SEO introductionDescription) Practice

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

Similar to keywords, we can write a concise description for each model in the content model editing interface of the Anqi CMS backend under 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 "discovering innovative products to enhance your business efficiency.

Similarly, in the template<head>In the 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" %}">

Through this method, we can ensure that each content model has a meaningful default description even without a more specific introduction.This undoubtedly greatly improves the operational efficiency for those websites with large amounts of content, requiring rapid publication, or 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,moduleDetailLabels often work together with other SEO-related tags to form a comprehensive TDK (Title, Description, Keywords) optimization system:

  • tdkTags: tdkTags are the core of TDK processing at the page level in AnQi CMS, it will intelligently output the corresponding Title, Keywords, and Description based on the type of the current page (home page, article detail page, category list page, etc.) In most cases,tdkThe label will take precedence overmoduleDetailLabel.
  • archiveDetailandcategoryDetailTags:These two labels are used to obtain the detailed information of specific articles and categories, includingKeywordsandDescriptionThe field. When the TDK information of the article or category is set, it will override the settings at the model level because more specific information usually has higher priority.

Therefore, a healthy SEO information acquisition logic is usually:

  1. Firstly, try to get the most specific TDK of the current page (such as getting the article's TDK for article detail pages, and getting the category's TDK for category list pages).
  2. If the TDK of a specific page is missing, it will fallback to the TDK of its content model (viamoduleDetaillabel acquisition).
  3. If the model TDK is also missing, it will fall back to the global site TDK (viasystemortdkget the home page TDK).

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

Summary

Anqi CMS'smoduleDetailTags provide a powerful tool for website operators to dynamically manage SEO keywords and descriptions at the content model level.It is closely integrated with the flexible content model design concept, making SEO management of large-scale websites more efficient and intelligent.moduleDetail,we 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.Use this tag wisely, it will be an important part of your successful CMS website operation.


Common Questions (FAQ)

Q1:moduleDetail标签获取的是具体文章的Keywords和Description吗?A1: 不是。moduleDetail标签获取的是Content ModelLayered Keywords and Description.For example, if you have an 'article' content model, you can set a set of common Keywords and Description for the model in the background.moduleDetailWhen it comes to this, it will pull the information at the model level, rather than the specific Keywords and Description of an article. To get the SEO information of a specific article, you should usearchiveDetailLabel.

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

  1. Article/Single Page Details:Show the Keywords and Description set for the current article/page first (througharchiveDetailorpageDetail).
  2. Category list page:优先显示当前分类自身设置的Keywords和Description(通过English)categoryDetail).
  3. 内容模型通用页(如模型首页)或更低优先级:EnglishIf the above more specific page has not been set, it will fallback to display its associatedContent ModelKeywords and Description (viamoduleDetail).
  4. Site-wide default:If none of the above levels are set, it may display the default homepage TDK (through the background global settings)tdkorsystemLabel). Therefore, the SEO information you set at different levels is complementary rather than completely conflicting.

Q3:moduleDetailTagsKeywordsandDescriptionWhere is the content configured?A3: This content is configured in the "Content Management" -u003e "Content ModelmoduleDetailThe label is called on the front end.