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:
- 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).
- If the TDK of a specific page is missing, it will fall back to the TDK of its content model (via
moduleDetaillabel retrieval). - If the model TDK is also missing, it will eventually fallback to the global site TDK (via
systemortdktag 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:
- Article/Single Page Details:Priority is given to the Keywords and Description set for the current article/page via
archiveDetailorpageDetail) - Category list page:Display the Keywords and Description set by the current category itself first (via
categoryDetail) - 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 (via
moduleDetail) - 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.