How to dynamically display the website's homepage TDK information in AnQiCMS?

Calendar 👁️ 77

The TDK of a website, which stands for Title (title), Description (description), and Keywords (keywords), is a basic element of Search Engine Optimization (SEO) that directly affects the display effect of the website on the Search Engine Results Page (SERP) and the willingness of users to click.For the "face" of a website - the homepage, precise and attractive TDK information is of great importance.

In AnQiCMS (AnQiCMS), managing and dynamically displaying the TDK information on the homepage is a straightforward and efficient task.The system design fully considers SEO requirements, allowing website operators to configure flexibly, and easily call through template tags to ensure that the home page TDK is always up-to-date and in line with **practice.

Configure the home page TDK information in the AnQiCMS background

All the related settings of the homepage TDK are concentrated in the Anqi CMS backend management interface. After logging in to the backend, you can find it through the navigation bar.Backend settingsClick to enter and see the special “Home TDK settings”Option. Here, you can refine the editing of the Title, Keywords, and Description for the homepage.

  1. Home Title (Title)This is the title displayed in the search engine results for the homepage, as well as the content displayed in the browser tab.A good homepage title should include the core keywords of the website, accurately summarize the theme of the website, and have a certain appeal. It is recommended to control the number of characters within 60.In AnQi CMS, you can directly enter the title content you expect in the "Home TDK Settings".
  2. Home Keywords (Keywords): Although modern search engines have reduced the weight of the Keywords tag, it is still a way to clearly express the core theme of a website to search engines. You can enter highly relevant keywords for your website business here, and separate multiple keywords with English commas,Separate. When selecting keywords, it is recommended to avoid堆积 and strive for accuracy.
  3. Description (Description)This is the website summary displayed below the title by the search engine.An attractive description can effectively increase the click-through rate. It should briefly introduce the content or services provided by the website, include core keywords, and encourage users to click.The word count is usually recommended to be between 120-150 characters.

Through these backend settings, you can always adjust the TDK information on the homepage according to the positioning of the website and the current content strategy without touching any code.

Dynamically call the home page TDK information in the website template

It is not enough to set the information in the background, you also need to ensure that this information is displayed correctly in the HTML code of the website for search engines to read. Anqi CMS provides a very convenient universal TDK tag——tdkIt allows you to dynamically call these configured TDK information within the website template (usuallyheadtags) inside the tag.

The followingtdkCommon methods and examples of the tag:

  1. Call Home Page Title (Title)In the HTML's<head>area, you can usetdktags to dynamically display the home page title.

    <title>{% tdk with name="Title" %}</title>
    

    This tag has a major highlight that it can intelligently combine the website name. If you want to automatically add the website name configured in the background "Global Settings" after the title of the homepage, and use a hyphen-Separate, you can do this:

    <title>{% tdk with name="Title" siteName=true %}</title>
    

    If you want to customize the separator between the title and the website name, for example, using an underscore_:

    <title>{% tdk with name="Title" siteName=true sep="_" %}</title>
    
  2. Call home page keywords (Keywords): Similarly in<head>area,tdkKeyword information called:

    <meta name="keywords" content="{% tdk with name="Keywords" %}">
    
  3. Home page description (Description): In<head>Area, description called:

    <meta name="description" content="{% tdk with name="Description" %}">
    
  4. Call specification link (CanonicalUrl)To avoid duplicate content issues and affect SEO, Anqi CMS also supports dynamically generating canonical links (CanonicalUrl). In the template, it is usually first checked whether a canonical link exists before outputting:

    {%- tdk canonical with name="CanonicalUrl" %}
    {%- if canonical %}
    <link rel="canonical" href="{{canonical}}" />
    {%- endif %}
    

    This ensures that the search engine can recognize the original source of the content, avoiding weight dispersion.

Advantages of dynamic TDK management in Anqi CMS

Through the background TDK settings provided by Anqi CMS andtdkTemplate tags, you can get the following main advantages:

  • Centralized managementAll the SEO meta information of the homepage can be managed and modified in one place on the back end, without logging into FTP or modifying code files.
  • Flexibility and convenienceThe update response of TDK content is quick, only needs to be modified and saved in the background, it can take effect immediately, greatly improving the operational efficiency.
  • SEO-friendlinessThe intelligent combination of tags (such as automatically adding website names, custom separators) helps websites better follow search engine recommendations.
  • Avoid errorsThe dynamic calling mechanism reduces the possibility of syntax errors or spelling errors that may occur when manually writing HTML code.

In summary, Anqi CMS provides a powerful and easy-to-use solution for TDK dynamic display, allowing website operators to focus on the content itself without worrying too much about technical details, ensuring better visibility and ranking on search engines.


Frequently Asked Questions (FAQ)

Q1: Why did I set the home page TDK, but the website front-end did not display or displayed incorrectly?A1: First, please check your website template (usuallybase.htmlorindex.htmlWhether the public header files have been used correctlytdkTag to call the corresponding information. For example,<title>The tag should contain{% tdk with name="Title" %}Next, confirm whether you have cleared the website cache. Anqi CMS usually caches configuration information, and the new TDK settings can take effect on the front page after clearing the cache (at the bottom of the left menu in the background "Update Cache").

Q2: What is the difference between the TDK settings on the homepage, category pages, and article detail pages?A2: The homepage TDK is the default TDK information for the entire website, mainly targeting the overall brand and core business of the website.And for category pages, article detail pages, single pages and other content, Anqi CMS also provides independent TDK settings (such as when editing categories or articles, there will usually be fields such as "SEO title", "keywords", and "description").These page-level TDKs will override the homepage TDK, making it more targeted, which is helpful for improving the search ranking of specific content.

Q3: Do I need to update the homepage TDK information regularly?A3: Unless your website has major adjustments (such as a change in brand name, shift in core business focus, or launch of important new products/services), the TDK information on the homepage usually does not need to be updated frequently.Overly frequent changes may confuse the search engine.It is recommended to make targeted optimizations and adjustments when the website content strategy changes or when data analysis shows that the existing TDK is not effective.

Related articles

How to display the website's contact phone number and address on the AnQiCMS front-end page?

In website operation, clearly and conveniently displaying the website's contact phone number and address is a key step in establishing user trust and promoting communication and interaction.For friends using AnQiCMS, the system provides a very flexible and intuitive way to manage and display this important contact information.This article will provide a detailed introduction on how to display the website's contact phone number and address on the AnQiCMS front-end page. ### Step 1: Enter contact information in the AnQiCMS backend Firstly, we need to ensure that the contact information of the website has been correctly entered in the backend.This is the foundation for displaying this information on the front end

2025-11-08

How to display custom copyright information in AnQiCMS templates?

In AnQiCMS website operation, the website footer usually carries important information, among which the copyright statement is not only a legal requirement, but also an embodiment of brand professionalism.Clear and dynamically updated copyright information that can enhance the professional image of the website and provide basic protection for the content.In AnQiCMS, managing and displaying custom copyright information on the website is a very intuitive and flexible operation.Next, we will learn how to set and display your custom copyright information in the AnQiCMS template.--- ### One

2025-11-08

How to obtain and display the filing number of the AnQiCMS website?

For websites operating in mainland China, the filing number (ICP number) is an indispensable element.It is not only a requirement of laws and regulations, but also an important symbol to enhance the credibility of the website and gain the trust of users.AnQiCMS knows this point and therefore considered convenient management and display of the filing number at the very beginning of system design, allowing website operators to easily complete the configuration. Next, we will together learn how to obtain (configure) and display the filing number on the AnQiCMS website.

2025-11-08

How to display website name and Logo in AnQiCMS?

The website's name and logo are like the face of a brand, they are not only the first impression visitors have of you, but also an important manifestation of the website's professionalism and recognition.In AnQi CMS, setting and displaying your website name and logo is a straightforward and efficient process.Next, we will explore how to perfectly present these key elements on your website. ### First, set up the website name and Logo To make your website have a unique name and Logo, the first step is to configure it in the Anqi CMS backend management interface.1. **Enter Global Settings**

2025-11-08

How to build and display a multi-level navigation menu in AnQiCMS template?

The website navigation is the first window for users to interact with the website. A clear and intuitive navigation system can greatly enhance the user experience and help visitors quickly find the information they need.AnQiCMS provides a flexible and powerful navigation management function, whether it is a simple single-level menu or a complex two-level, three-level, or even more hierarchical multi-level navigation, it can be easily realized.Next, we will learn in detail how to build and display multi-level navigation menus in AnQiCMS.## Backend Settings: The Foundation of Navigation Construction Navigation construction in AnQiCMS begins with careful configuration in the backend

2025-11-08

How to use the breadcrumb navigation tag of AnQiCMS to display the current page path?

In website operation, a clear navigation path is crucial for user experience and search engine optimization (SEO).A Breadcrumb Navigation is an auxiliary tool that can significantly improve the usability of a website, providing a quick and convenient way for users to return to their previous page and clearly indicating their position on the current page.In AnQiCMS, implementing breadcrumb navigation is very simple and flexible.AnQiCMS provides us with a dedicated breadcrumb navigation tag `breadcrumb`, through it

2025-11-08

How to get the category list of a specified content model and display it in AnQiCMS?

In AnQiCMS, flexibly obtaining and displaying the category list of the specified content model is the key to building a clear website structure and a good user experience.Whether it is product display, article archive, or service introduction, the category list plays an important navigation role.AnQiCMS's powerful template tag system makes this process intuitive and efficient.

2025-11-08

How to display detailed information and description of the current category in AnQiCMS?

When operating the AnQiCMS website, we often need to dynamically display detailed information and descriptions of the current category on the category page, such as the title, introduction, large picture, and even custom fields.This not only helps users better understand the theme of the current page, but also effectively improves the page's SEO performance.The Anqi CMS provides very flexible and intuitive template tags, making this task easy and simple.### Get to know the `categoryDetail` tag

2025-11-08