How to dynamically generate the page Title, Keywords, and Description using the `tdk` tag to optimize SEO display?

Calendar 👁️ 98

In website operation, Search Engine Optimization (SEO) is a key link to improve website visibility and attract natural traffic. Among them, the page'sTitle(Title),Keywords(keywords) andDescription(Description), abbreviated as TDK, is an important signal for search engines to understand page content and determine rankings.An excellent TDK setting can make your website stand out among a sea of information.

AnQiCMS (AnQiCMS) understands the importance of TDK and has integrated powerful TDK management functions into the system design from the beginning, providing a flexible dynamic generation mechanism to help users easily achieve refined SEO optimization.

AnQi CMS TDK Feature Overview

AnQi CMS provides website administrators and content creators with multi-dimensional TDK configuration capabilities, whether you are managing the homepage of the entire website or setting independent TDK for specific articles, products, categories, tags, or even independent pages.This meticulous management approach ensures that each page can have the most accurate SEO metadata.

The advanced SEO tool built-in combined with static cache optimization not only makes the TDK configuration simple and intuitive, but also ensures that these optimization measures can effectively improve the loading speed and search engine friendliness of the website.This means that every TDK you set in Anqi CMS will be recognized and interpreted by search engines with the highest efficiency.

Core tool:tdkMagic of tags

In the template system of Anqi CMS,tdkThe tag is the unified interface for dynamic TDK generation. This "universal" tag can intelligently grab and output the most suitable Title, Keywords, and Description according to the context of the current page.You do not need to write complex logical judgments for different types of pages, just call the templatetdkTags, the system will perform intelligent matching.

For example, when a user accesses a specific article,tdkThe tag will prioritize finding the SEO title, keywords, and description set separately for the article;If the page accessed is a category page, it will extract the TDK information of that category.This mechanism greatly simplifies template development and ensures the accuracy and dynamism of TDK.The basic form of use is usually:{% tdk 变量名称 with name="字段名称" %}.

Fine-tuning of each element of TDK

Make full use oftdkThe dynamic ability of tags, we need to understand how to configure the various elements of TDK at different locations in the Anqi CMS backend.

  1. Page Title (Title)Page's<title>Tags are the content that users see in the browser tab, and they are also the most important title in the search engine results page (SERP).It directly affects the user's click intention and the ranking of search engines.

    • Set location:
      • HomeIn the "Background Settings" -> "Home TDK Settings" configure the "Home Title".
      • Article/Product Details Page: When editing articles/products, find the 'Other Parameters' section and locate the 'SEO Title'.
      • Category Page: When editing categories, find the 'Other Parameters' section and locate the 'SEO Title'.
      • Tab page: Find 'SEO Title' when editing tags.
      • single page: Find 'SEO Title' when editing a single page.
    • Template call:{% tdk with name="Title" %}. You can choose whether to add the website name after the title (siteName=true), and customize the separator (sep="_"). On category or article detail pages, you can also useshowParent=trueDisplay the title of the parent category, building a title structure with more levels.
  2. Page Keywords (Keywords) <meta name="keywords">Tags are used to tell search engines the main keywords of the page. Although their direct impact on ranking is not as great as before, they are still an indispensable part of website optimization strategy.

    • Set location:
      • HomeIn the "Background Settings" -> "Home TDK Settings" configure the "Home Keywords".
      • Article/Product Details PageEnter the "Document Keywords" directly when editing articles/products.
      • Category Page: Find the 'Keywords' in the 'Other Parameters' when editing the category.
      • Tab page: Enter the 'Tag Keywords' when editing the tag.
      • single page: Enter the 'Keywords' when editing the single page.
    • Template call:<meta name="keywords" content="{% tdk with name="Keywords" %}">.
  3. Page Description (Description) <meta name="description">Labels are usually the summaries displayed by search engines in search results. An attractive description can effectively improve the click-through rate of the page.

    • Set location:
      • HomeIn the "Background Settings" -> "Home TDK Settings" configure the "Home Description".
      • Article/Product Details PageFill in the "Document Summary" when editing articles/products.
      • Category Page: Enter the 'Category Introduction' when editing the category.
      • Tab page: Enter the 'Tag Introduction' when editing the tag.
      • single page: Enter the 'Single Page Introduction' when editing the single page.
    • Template call:<meta name="description" content="{% tdk with name="Description" %}">.
  4. Standard Link (CanonicalUrl) <link rel="canonical">Tags are used to resolve content duplication issues, informing search engines which is the preferred version of the page. This is crucial to avoid unnecessary duplicate content penalties.

    • Set location: When editing an article/product, you can set the 'standard link' in the 'other parameters'.
    • Template call: It usually performs conditional judgment, and only outputs when there is a standard link.
      
      {%- tdk canonical with name="CanonicalUrl" %}
      {%- if canonical %}
      <link rel="canonical" href="{{canonical}}" />
      {%- endif %}
      

Practice operation: Apply TDK tags in the template

In your website template (usuallybase.htmlor in the public header file) of<head>area, you can call it uniformly like thistdkTags to dynamically generate TDK information:

<!DOCTYPE html>
<html lang="{% system with name='Language' %}"> {# 动态设置语言,提升用户体验和SEO #}
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% tdk with name="Title" siteName=true sep=" - " showParent=true %}</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 %}

    {# 其他CSS、JavaScript文件引用 #}
    <link rel="stylesheet" href="{% system with name="TemplateUrl" %}/css/style.css">
</head>
<body>
    {# 网站主体内容 #}
</body>
</html>

With the above code, your website will be able to automatically generate and display the most relevant TDK information based on the type of page being accessed, without manually modifying the meta tags on each page.

SEO Optimization Suggestions

After mastering the method of dynamic TDK generation in Anqi CMS, here are some optimization suggestions to help your website perform better in search engines:

  • Unique and attractive TDKMake sure each page's Title and Description are unique, relevant, and attractive.Avoid using generic or repetitive TDK. The Title should succinctly summarize the page content, and the Description should act like an advertisement, guiding users to click.
  • Naturally integrated keywordsIn TDK, naturally integrate core keywords, but avoid keyword stuffing. Overstuffing keywords can not only lead to search engine penalties, but also reduce the user reading experience.
  • Regular review and update: Content and SEO environment are constantly changing, it is very necessary to regularly review and update TDK. Pay attention to keyword performance, click-through rate and other data, and adjust TDK strategy in a timely manner.
  • Combine with other SEO features: Anqi CMS not only provides TDK features, but also includes advanced SEO tools such as static page generation, Sitemap creation, Robots.txt configuration, keyword library management, and more.Combining these features can have a greater optimization effect.

The TDK dynamic generation mechanism of AnQi CMS provides great convenience and efficiency for your website's SEO work.By flexibly configuring the background content and properly using template tags, you can build a website that is highly friendly to search engines and also provides a high-quality user experience.


Frequently Asked Questions (FAQ)

Q1: Why did I set the SEO title of the article, but the page title tag still shows the article title instead of the SEO title I set? A1:Please check if your template code has used the tags correctlytdkto call the SEO title. For example, you should use{% tdk with name="Title" %}. If the template directly calls the article object (for example{{archive.Title}}),then it will not read the 'SEO title' field you set in the background. Make sure all TDK-related meta tags in the template are throughtdktags to dynamically retrieve content.

**

Related articles

How to get and display the title, content, and image of a single page using the `pageDetail` tag?

## AnQi CMS `pageDetail` tag: Easily obtain and display single page information Single pages (such as "About Us", "Contact Us", "Terms of Service", etc.) play an indispensable role in website content management.They usually carry stable, core information that does not need to be updated as frequently as articles or products.AnQi CMS provides an efficient and flexible tool for displaying this type of page - the `pageDetail` tag.Mastering the use of this tag will allow you to be proficient in template development, easily presenting beautifully designed single-page content

2025-11-07

How to get and display the title, description, thumbnail, and associated content of the `categoryDetail` tag?

Manage and display website content in Anqi CMS, the `categoryDetail` tag plays a crucial role.It is like the conductor of your website content display, able to accurately obtain and present all the detailed information of a specific category, whether it is the title, description, thumbnail, or deeper related content, it can help you a lot. ### The core function of the `categoryDetail` tag In simple terms, the mission of the `categoryDetail` tag is to obtain detailed data for a single category.

2025-11-07

How to implement pagination for document list, related documents, and search results using the `archiveList` tag?

Manage website content in Anqi CMS, whether it is blog articles, product displays, or news information, efficient list display is indispensable.When the amount of content gradually increases, how to elegantly present a large number of documents and ensure that users can easily browse and search has become a key point that operators need to pay attention to.At this time, the `archiveList` tag and its accompanying pagination feature have become a powerful tool in our hands, it can not only implement pagination for conventional document lists, but also be flexibly applied to the display of related documents and search results.### Pagination display of document list Imagine

2025-11-07

How to retrieve and display specific fields (such as title, content, image) of the document detail page using the `archiveDetail` tag?

On Anqi CMS built websites, each document detail page is the key to displaying core content and attracting visitors to stay.To ensure that these pages can efficiently and flexibly present important information such as article titles, content, images, etc., it is particularly important to understand and make good use of the `archiveDetail` tag.It is the powerful tool that precisely locates and flexibly displays these core data.## Master the `archiveDetail` tag: Accurately locate and display document detail content When you create an article or product detail page in AnQiCMS

2025-11-07

How to build a multi-level navigation menu using the `navList` tag and display it on the front end?

AnqiCMS provides powerful and flexible configuration options for website navigation, allowing you to easily build multi-level navigation menus and customize the display on the front-end website according to business needs.Whether it is a simple single-layer menu or a complex multi-level navigation with dropdown content, the `navList` tag can help you a lot. To implement multi-level navigation, we first need to complete the configuration of the navigation structure in the background management system, which lays the foundation for the display on the front end.

2025-11-07

How does the `contact` tag dynamically display website contact information (phone, address, email, etc.)?

AnQiCMS (AnQiCMS) provides a flexible and efficient way to manage various types of information on a website, where the dynamic display of website contact information can be easily realized through its built-in `contact` tag.This means you do not need to manually modify the code, and can manage phone numbers, addresses, email information centrally in the background, and have them automatically updated to various pages of the website. ### One, set the website contact information centrally in the background To dynamically display contact information, you first need to enter this information into the Anqi CMS backend.The operation path is very intuitive: log in to the background after

2025-11-07

How to generate breadcrumb navigation using the `breadcrumb` tag to enhance the user's understanding of the page hierarchy?

In complex website content structures, users sometimes feel lost, not knowing the position of the current page.At this time, an auxiliary navigation method called "Breadcrumb Navigation" is particularly important.It not only clearly displays the path from the home page to the current page, but also helps users quickly understand the hierarchical structure of the website, thereby improving the browsing experience.For websites built with AnQiCMS, the system-built `breadcrumb` tag is exactly the tool to generate this efficient navigation.

2025-11-07

How `prevArchive` and `nextArchive` tags display the link and title of the previous/next document?

When browsing website content, users often hope to be able to easily jump from the current page to related or adjacent articles.This kind of previous/next navigation can not only significantly improve user experience, but also play an active role in SEO, guiding search engine spiders to more deeply crawl website content.

2025-11-07