What is the role of the variable name of the `tdk` tag in the AnQi CMS template?

Calendar 👁️ 58

The AnQi CMS template includestdkTag: Mastering SEO, the key to building high-performance websites

As an experienced website operation expert, I am well aware of the core status of TDK (Title, Description, Keywords) in website SEO.They are not only the key signals for search engines to understand web content, but also the first line of defense to attract users and increase website traffic.In daily content operations, how to efficiently and flexibly manage TDK is an important aspect of enhancing website competitiveness.

Today, let's delve into the AnQiCMS templatetdkThe variable name and its function. Anqi CMS, developed with the efficient architecture of Go language and friendly support for SEO, has become the preferred choice for many small and medium-sized enterprises and content operators. AndtdkThe tag is a Swiss Army knife in its SEO toolkit, let's unveil its mysterious veil together.

The importance of TDK is self-evident.

On the search engine results page (SERP), the webpage title (Title) is the first information users see, which directly affects the click-through rate.Description is a concise summary of the page content, and it is also a key to attract users to delve deeper.Keywords (Keywords), although the direct ranking weight has decreased now, it is still an important auxiliary information to help search engines understand the theme of the page.

The Anqi CMS has always placed a high emphasis on SEO from its design, providing a series of advanced SEO tools including pseudo-static, 301 redirection, Sitemap generation, and more.Incorporating the depth of TDK management into the template system is a manifestation of its 'SEO-friendly' concept. ThroughtdkLabel, the operator can refine the control of TDK on each page in the content layer, ensuring that each page can appear in search engines and users with **status.

In AnQi CMStdkLabel: The Essence of It All

In the world of Anqi CMS templates, we use syntax similar to the Django template engine, through double braces{{变量}}Define variables, as well as single curly braces and percent signs{% 标签 %}Use tags.tdkThis tag is a core tag designed to unify and intelligently retrieve the TDK information of the current page.

UsetdkWhen labeling, we usually combinenameparameters to specify the specific TDK items to be retrieved. For example, to get the page title, we would write{% tdk with name="Title" %}. This design allows template developers to not worry about the source of TDK data (whether it comes from global settings, category settings, or specific document settings), just declare which TDK information is needed, and the system will automatically provide it to you according to priority.

Next, we will explain in detailtdkCommon variable names used in tags and their specific roles in website operations.

In-depth analysis of TDK tag variable names

1. Page title (Title)

This is the most important factor for website SEO.TitleVariables represent the HTML of the current page.<title>Content of the tag. A good title should not only contain core keywords but also be able to attract user clicks.

In the Anqi CMS template, obtaining the page title is very intuitive:

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

Buttdkthe tag in processingTitlealso provided several very practical parameters, making the title generation more intelligent and flexible:

  • siteName=true: This parameter allows you to automatically append the website name at the end of the page title. This is very important for brand exposure and consistency. For example, if you have setsiteName=trueA title of an article page might be displayed as "How to Use AnQi CMS - AnQi CMS Official Website".
  • sep="分隔符": WhensiteName=trueAt that time, you can customize the separator between the page title and the website name, the default is a hyphen-. If you like underscores_, you can set it like this:{% tdk with name="Title" siteName=true sep="_" %}.
  • showParent=true: On pages with a deep hierarchy (such as article detail pages), you may want the title to include the name of its parent category. SetshowParent=trueAfter, the title will intelligently bring the information of the parent category, enhancing the page hierarchy and context relevance.

These parameters are combined to allow operators to generate dynamic titles that are in line with SEO practices and also take user experience into account.

2. Page keywords (Keywords)

Although search engines forKeywordsIts direct ranking weight is no longer as strong as before, but it is still an auxiliary information to help search engines understand the theme of the page. It still has its value in some vertical search fields or specific search engines.

In AnQi CMS template, obtain the page keywords:

<meta name="keywords" content="{% tdk with name="Keywords" %}">

Here to obtain theKeywordsThe value comes from the keywords filled in the background in content, category, or global settings. Operators should set relevant and moderate keywords according to the specific content of the page.

3. Page Description (Description)

Page description is a concise summary of the page content, it often appears as the summary text in search results and is one of the important factors that attract users to click.A high-quality description should contain core keywords and stimulate user interest.

Get the page description in AnQi CMS template:

<meta name="description" content="{% tdk with name="Description" %}">

ThisDescriptionThe value will be intelligently extracted from the current page, its category, or global settings to ensure that each page has an appropriate summary.

4. Standard link of the page (CanonicalUrl)

CanonicalUrlIt is a very important SEO tag, its role is to inform search engines where the authoritative version of the content on the current page is located.This is crucial for dealing with content duplication issues (such as the same article existing with different URLs, or consistent content on PC and mobile ends).Correct UseCanonicalUrlCan avoid search engine confusion, concentrate page weight, improve SEO effect.

It is usually used in Anqi CMS template, and a judgment is made:

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

In this way, only when the background sets the specification link for the current page,CanonicalUrlthe tag will be output to ensure its validity and avoid unnecessary redundancy.

Intelligent acquisition and flexible configuration of TDK tags

AnQi CMS follows a set of intelligent priority rules in obtaining TDK values, which greatly improves the efficiency and flexibility of content operation:

  1. Page/document levelWhen editing a specific article, product, or single page, if you set independent SEO titles, keywords, and descriptions, this information will have the highest priority.This allows you to customize every important page with the utmost precision.
  2. Category levelIf the specific page does not set TDK, the system will trace up and try to get the TDK settings of its category.This is very convenient for batch managing the TDK of a certain type of content, for example, all products in a product series can inherit the TDK information of the product category.
  3. Global Level (Home TDK Settings)If the page and category do not have specific TDK settings, the system will finally adopt the global default values defined in the background "Homepage TDK Settings".This provides a basic SEO guarantee for the entire website.

This hierarchical TDK management mechanism allows Anqi CMS to ensure high customization while also greatly reducing redundant work through intelligent inheritance, making it effortless whether it is for the meticulous crafting of a single page or for the bulk optimization of a content model.

Conclusion

The AnQi CMS template includestdkIt is not just a simple variable calling tool, but also a core tool integrating smart inheritance, flexible customization, and SEO optimization. By masteringTitle/Keywords/DescriptionandCanonicalUrlThese variable names and their parameters, combined with the hierarchical TDK settings in the background, allow website operators to better control search engine optimization and win more exposure and traffic for the website.

In today's increasingly fierce digital marketing, every detail may become a breakthrough in competition.Aqin CMS is precisely through this attention to detail and technological innovation, providing users with a powerful and practical content management solution, helping businesses stand out in the Internet world.


Frequently Asked Questions (FAQ)

Q1: What is the priority of the TDK value in Anqi CMS? When I set TDK in different places, which one will take effect?

A1: The TDK value of AnQi CMS follows a clear priority principle. The highest priority isspecific page/documentTDK set separately in (such as articles, products, single pages). If the page itself is not set, the system will look for itsCategoryThe TDK. If the category is not set either, the one from the background will be used.Home TDK settingsGlobal TDK defined in the quotation marks. In simple terms: Page settings > Category settings > Global settings.

**Q2: Can I be

Related articles

What is the correct way to call `CanonicalUrl` in the `tdk` tag of AnQi CMS?

As an experienced website operations expert, I know that search engine optimization (SEO) plays a key role in the success of a website, and one often overlooked but crucial detail is the correct use of `Canonical Url`. In such a powerful content management system as AnQiCMS, we also need to master the practice of calling `CanonicalUrl` with the `tdk` tag to ensure the uniqueness and authority of the website content, thereby achieving better performance in search engines.

2025-11-07

How to use the `showParent=true` attribute in AnQi CMS to display more hierarchical information in the Title?

AnQi CMS, as an enterprise-level content management system that deeply understands the way of content operation, its powerful functional design reflects a profound understanding of user needs and search engine optimization.The importance of page title (Title) in website operation is self-evident, it is not only the first entry point for users to click, but also the core basis for search engines to judge the relevance of page content.Today, let's delve into how AnQi CMS cleverly utilizes the `tdk` tag's `showParent=true` attribute to give the page title more rich and hierarchical information

2025-11-07

How to customize the separator of the `sep` attribute for the AnQi CMS page title?

In today's digital world, every detail of a website can affect its performance in search engines and the first impression of users.The page title (Title) serves as the 'face' of the website content, its importance is self-evident.It is not only a key clue for search engines to understand the theme of a web page, but also a direct factor for users to decide whether to click in the search results.AnQiCMS (AnQiCMS) knows this and is committed to providing users with efficient and customizable content management solutions, including fine-grained control over page titles.As an experienced website operations expert

2025-11-07

What is the difference between `siteName=true` and `siteName=false` in the Title tag of AnQi CMS?

The secret of the Title tag in AnQi CMS: Deep analysis of `siteName=true` and `siteName=false`The title tag acts as the 'face' of a webpage, its importance is self-evident.It is not only a key signal for search engines to understand the theme of a page, but also the primary information that users determine at a glance in search results.

2025-11-07

How can AnQi CMS automatically generate Sitemap to help search engines crawl TDK information?

In today's highly competitive online environment, it is the goal of every website operator to efficiently have their website content discovered, crawled, and accurately displayed by search engines.Among these, the TDK (Title, Description, Keywords) information of the website, is like the "business card" of your website presented on the search engine results page (SERP), and its quality directly affects the click-through rate and user access.However, how can we ensure that these carefully prepared TDK information can be effectively read by search engine spiders and presented to users?AnQi CMS knows this pain point

2025-11-07

How does the Robots.txt configuration of Anqi CMS affect the crawling of TDK tags by search engines?

As an experienced website operations expert, I am well aware of the importance of Search Engine Optimization (SEO) for website visibility.Among many SEO strategies, the title (Title), description (Description), and keywords (Keywords) of a web page, which we usually call TDK tags, are the core elements that attract the attention of search engines and users.And the Robots.txt file, this seemingly simple text file, acts like a director behind the scenes, subtly influencing how search engine spiders interact with our website content, including TDK tags.

2025-11-07

How to accelerate the inclusion of TDK tags through the link push function of AnQi CMS?

As an experienced website operations expert, I am well aware that in today's highly competitive digital environment, how to make the website content stand out and be quickly discovered and indexed by search engines is the focus of every operator.TDK tags (Title, Description, Keywords) act as the "business card" of website content, and their quality and inclusion speed directly affect the website's search visibility and click-through rate.

2025-11-07

Will the content collection function of AnQi CMS affect the originality of the TDK tags?

In the vast ocean of website operation, TDK (Title, Description, Keywords) tags are like the facade of a website and a bridge for communication with search engines, their originality and high quality are crucial for SEO effects.Whether the content collection function of a powerful content management system like AnQiCMS (AnQiCMS) will affect the originality of TDK tags is a core issue that many operators are concerned about.

2025-11-07