In today's digital age, Search Engine Optimization (SEO) is crucial for the success of any website, and the TDK information of the page, namely the page Title (title), Description (description), and Keywords (keywords), is a key factor for search engines to understand the content of the page and determine its ranking.If this information is set correctly, it can not only improve the visibility of the website in search results, but also attract users to click and bring high-quality traffic.
Setting TDK for each page manually is not only time-consuming and labor-intensive, but also prone to omissions.It is fortunate that AnQiCMS provides us with a flexible and powerful dynamic TDK setting function, allowing us to intelligently configure these important SEO elements according to different page types.Next, let's take a look at how to make full use of these features in AnQiCMS, so that your website stands out in search engines.
Understanding the TDK setting hierarchy of AnQiCMS
AnQiCMS takes an intelligent hierarchical management approach in TDK settings, which allows us to balance the uniformity of global settings and the personalized needs of specific pages. In short, the priority of TDK information is as follows:
- Page-specific TDK:Independent settings for specific articles, products, or single pages have the highest priority.
- Category/Model TDK:The TDK set for a specific category or content model (such as article model, product model) will take effect on the pages under the category or model when there is no dedicated TDK.
- Global Default TDK (Home Page TDK):If neither of the above is set, the system will use the global TDK settings of the home page as a fallback.
Understand this level relationship can help us plan and manage the website's SEO strategy more efficiently.
Set global TDK default values (home page)
First, let's configure the "front page" of the website - the TDK information of the homepage.This not only provides SEO support for the homepage itself, but also sets a default TDK foundation for the entire website.
Enter AnQiCMS backend, navigate to the "Backend settings" menu, find the "Homepage TDK settings". Here, you can see three input boxes:
- Home Page Title:This is the title displayed in search engine results for the website homepage, as well as the title of the browser tab. It is recommended to include your brand name and core business keywords.
- Home page keywords:List the most relevant and important several core keywords for your website. Please use English commas between multiple keywords.
,. - Home page description:Concisely summarize the main content and services of the website to attract users to click. This description will be displayed below the search result title.
After filling out this information, remember to click Save.
How to call in the template?
On your website template file (usually)base.htmlorindex.htmlof<head>Region), AnQiCMS provides a convenienttdktags to dynamically retrieve this information.
Here is a typical call example:
<head>
<meta charset="UTF-8">
<title>{% tdk with name="Title" siteName=true sep=" - " %}</title>
<meta name="keywords" content="{% tdk with name="Keywords" %}">
<meta name="description" content="{% tdk with name="Description" %}">
{# 可选:设置页面的规范链接,有助于避免重复内容问题 #}
{%- tdk canonical with name="CanonicalUrl" %}
{%- if canonical %}
<link rel="canonical" href="{{canonical}}" />
{%- endif %}
</head>
It is worth noting here that{% tdk with name="Title" siteName=true sep=" - " %}This code.
siteName=trueWill intelligently append the "Website Name" configured in "Global Function Settings" to the end of the page title, enhancing brand recognition.sep=" - "Then defines the separator between the website name and page title.
After this is set, even if other pages do not have specific TDK, they will inherit the keywords and descriptions of the homepage, and also include the title of the website.
Dynamically set the content page (article, product, etc.) TDK
For specific content pages on the website, such as an article or a product detail, we usually need more precise TDK to reflect its uniqueness.AnQiCMS allows us to easily customize this information when publishing content.
When you create or edit an article ("Content management" -> "Publish document") or product in the background, you will see "Other parametersThe content, expanded, can find the specific SEO field: English
- SEO title:Fill in the exclusive title of the current article/product. If left blank, the system will use the 'Document Title' of the article/product as the page title by default.
- Document keywords:Enter keywords closely related to this article/product. Separate multiple keywords with English commas
,The content is separated. If left blank, the system will automatically extract keywords from the document content or use the global default keywords. - document summary:Write a concise description for this article/product. If left blank, the system will attempt to automatically extract the first 150 characters from the article/product content as the description.
How to call in the template?
AnQiCMStdkThe label is very smart.When it is called on a content detail page, it will automatically detect and prefer to use the "SEO title", "document keywords", and "document description" you filled in on the content editing page.If these fields are empty, it will automatically use the "document title" and "document summary" information of the article/product according to the preset rules.
Therefore, the calling method in the template can be consistent with the calling method on the homepage, no additional modification is required:
<head>
<meta charset="UTF-8">
<title>{% tdk with name="Title" siteName=true sep=" - " %}</title>
<meta name="keywords" content="{% tdk with name="Keywords" %}">
<meta name="description" content="{% tdk with name="Description" %}">
</head>
AnQiCMStdkTags are automatically fetched for the current page type (article page, product page, or others) to grab the most suitable TDK data. This greatly simplifies the development and maintenance of templates.
Dynamically set the category page's TDK
分类页面(例如“新闻中心”、“产品列表”)同样是搜索引擎关注的重要入口。AnQiCMS允许您为每个分类独立设置TDK。
In the background go to “Content management" -> "Document Category”, when you select a category for editing, you will find the following SEO fields in “Other parameters”}]
- SEO title:Customize a unique title for this category page. If left blank, the system will use 'Category Name' as the page title by default.
- Keywords:Enter keywords related to the category topic. Separate multiple keywords with English commas
,If left blank, the system