How to dynamically set the page TDK information to optimize SEO display?

Calendar 👁️ 70

In today's digital age, Search Engine Optimization (SEO) is crucial for the success of any website, and the TDK information of the page - that is, the page's 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.

Manually setting TDK for each page is not only time-consuming and labor-intensive, but also easy to miss.Luckyly, 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 can stand out in search engines.

Understanding the TDK setting hierarchy of AnQi CMS

AnQiCMS adopts an intelligent hierarchical management method 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:

  1. Page-specific TDK:Independent settings for specific articles, products, or single pages have the highest priority.
  2. Category/Model TDK:The TDK set for a certain category or content model (such as an article model or product model) will take effect when there is no dedicated TDK under the category or model page.
  3. Global Default TDK (Home Page TDK):If neither of the above two are set, the system will use the global TDK settings of the home page as a fallback.

Understand this hierarchy, which can help us plan and manage the website's SEO strategy more efficiently.

Set the global TDK default value (home page)

First, let's configure the "front door" 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.

Log in to the AnQiCMS backend, navigate to the “Backend settings” menu, find “Home TDK settings”. Here, you can see three input boxes:

  • Home 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.
  • Homepage keywords: List the most relevant and important core keywords for your website. Please use English commas between multiple keywords.,Separated.
  • Home page description:Concisely summarize the main content and services of the website, attracting users to click. This description will be displayed below the search results title.

After filling in this information, remember to click save.

How to call in the template?

In your website template file (usually)base.htmlorindex.htmlof<head>area), AnQiCMS provides a convenienttdktag to dynamically retrieve this information.

Here is an example of a typical call:

<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:{% tdk with name="Title" siteName=true sep=" - " %}This piece of code.

  • siteName=trueIntelligently appends the "Website Name" you configured in the "Global Feature Settings" to the end of the page title, enhancing brand recognition.
  • sep=" - "It defines the separator between the website name and the 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 add the title with the website name.

Dynamically set the TDK of content pages (articles, products, etc.)

For specific content pages on a website, such as an article or product details, we usually need more accurate TDKs to reflect their uniqueness.AnQiCMS allows us to easily customize this information when publishing content.

When you create or edit articles ("Content Management" -> "Publish document") or products in the background, you will see ".Special SEO field can be found in the expanded part:

  • SEO Title:Enter the exclusive title for the current article/product. If left blank, the system will use the 'document title' of the article/product as the page title first.
  • Document keywords:Enter keywords closely related to the article/product. Separate multiple keywords with English commas,Separate. 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?

AnQiCMS'tdkThe tag is very intelligent. When it is called in a content detail page, it will automatically detect and prioritize the "SEO title", "document keywords", and "document introduction" you fill in on the content editing page.If these fields are empty, it will automatically fill in information such as the article/product 'document title' and 'document summary' according to preset rules.

Therefore, the calling method in the template can remain 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>

AnQiCMS'tdkThe tag will automatically fetch the most suitable TDK data based on the current page type (article page, product page, or others). This greatly simplifies the development and maintenance of templates.

Dynamically set the TDK of the category page

Category pages (such as "News Center", "Product List") are also important entry points for search engines. AnQiCMS allows you to set TDK independently for each category.

Enter in the background “Content Management" -> "Document Category”, when you select a category to edit, you will find the following SEO fields in “.

  • SEO Title:Customize a unique title for the category page. If left blank, the system will use the "category name" as the page title first.
  • Keywords:Enter keywords related to the category topic. Separate multiple keywords with English commas,If left blank, the system

Related articles

How to display a company's contact information on the front-end page, including custom fields?

It is crucial to clearly and conveniently display a company's contact information in website operation.It not only enhances visitors' trust in the website, facilitates potential customers to consult, but is also the cornerstone of business transformation.AnQiCMS (AnQiCMS) understands this and provides powerful and flexible features that allow you to easily manage and display various corporate contact information on the website front end, including custom fields.

2025-11-08

How to display the system configured name and Logo on the website homepage?

The website's name and logo are the foundation of the brand image, they can not only quickly convey the identity of the website, but also enhance the user's sense of trust and recognition.In AnQiCMS, presenting these important brand elements on the homepage is a direct and flexible task.AnQiCMS provides an intuitive backend setup and powerful template tag features, making this task very simple.### Backend Configuration: Unified Brand Information Management Firstly, all information that needs to be displayed on the website front end must be managed uniformly in the AnQiCMS backend

2025-11-08

How to set up independent display templates for articles, products, or single pages?

How to set up independent display templates for articles, products, or single pages in Anqi CMS?In website operations, we often encounter such needs: a special article needs a unique layout to highlight its importance, a product needs a dedicated display page to improve conversion rate, or a core single-page such as "About Us" needs a different design to strengthen the brand image.

2025-11-08

How to avoid content garbling caused by encoding problems in template files?

In the process of building and operating a website with AnQiCMS, we strive for smooth content display and ultimate user experience.However, the occasional problem of "content garbling" can often be like a stumbling block, making carefully arranged content look completely different, seriously affecting the professionalism of the website and the reading experience of users.This content is garbled, especially when it appears in template files, and it is often due to inconsistent file encoding.Understanding and solving this problem is crucial for the stable operation of the website.

2025-11-08

How to build and display multi-level navigation menus on a website?

The website navigation menu is a guidepost for users to browse the website content, a well-designed multi-level navigation system can significantly improve user experience, and help visitors quickly locate the required information.A clear, intuitive, and easy-to-use navigation is a key element for the success of a corporate website, product showcase page, or content portal.AnQi CMS is a comprehensive and flexible content management system that provides intuitive backend settings and powerful template tags, allowing you to easily build and manage multi-level navigation menus that meet various needs.

2025-11-08

How to correctly display the breadcrumb navigation path on the content page?

Breadcrumb Navigation is a very common and practical navigation method on websites, which can clearly display the current position of the user in the website hierarchy, just like breadcrumbs scattered in the forest guiding the way home.For users, breadcrumb navigation not only helps them quickly understand the hierarchical relationship of the current page in the entire website, but also facilitates their return to the previous level or higher-level pages, greatly enhancing the user experience of the website.At the same time, for search engine optimization (SEO)

2025-11-08

How to display a category list based on content model or parent-child relationship?

AnQi CMS is an efficient enterprise-level content management system that provides great flexibility in content organization and display.For many websites, how to display a category list based on different content models or the hierarchical relationship of categories is a very common and important need.This concerns not only the organization structure of the website content, but also directly affects the user experience and SEO effect.In Anqi CMS, implementing such a display is not complicated.The built-in template tags provide us with powerful functions, allowing us to easily control the output of the classification list

2025-11-08

How to retrieve and display detailed information of a specific category (such as description, Banner image)?

In Anqi CMS, it is crucial to flexibly obtain and display detailed information about categories, such as descriptions, Banner images, or thumbnails, which is essential for building a website rich in content and visually appealing.Whether it is necessary to display a brief introduction on the category list page or to reference the promotional picture of a specific category on a specific page, Anqi CMS provides intuitive and powerful template tags to help you meet these needs. To get detailed information about the category, we mainly rely on the `categoryDetail` template tag.This tag is specifically designed to extract data for each category

2025-11-08