Understand the TDK hierarchy and priority in Auto CMS

In Anqi CMS, the TDK settings have a clear hierarchy structure. The system will intelligently determine the final effective TDK based on the page type and specific settings.

Firstly, the website has anGlobal TDK settingsThis is reflected mainly in the "Home Page TDK Settings" on the backend. The title, keywords, and description set here will serve as the default TDK for the website, particularly suitable for the home page.

The second point is that for specific content entities, such asarticles, products, categories, single pages

When a user visits a page, the security CMS will prioritize the page's own content-level TDK.If the page does not have a separate TDK set, the system will intelligently backtrack to the TDK of its category. If the category is also not set, the site's global TDK will be used as a fallback.This priority mechanism ensures that each page can have a reasonable TDK, even if the operator fails to configure each one individually, the system can still provide basic SEO information.

精细化的后台TDK设置

To implement the dynamic call of TDK, the corresponding settings need to be made in the Anqin CMS backend.

ForHome page of the websiteWe can navigate to the 'Homepage TDK Settings' module under 'Background Settings' in the background.Here, you can specify a dedicated 'Home Title', 'Home Keywords', and 'Home Description' for the website homepage.This information is the facade of the website, should be carefully written, highlighting the core values and business characteristics of the website.

ForArticles, products, and other documentsWhen we 'publish documents' or edit existing documents in 'Content Management', we can expand the 'Other Parameters' section. Here, we can find 'SEO Title' to define the page'stitleLabel content, an independent 'Document Keywords' field is used to fillkeywordswhile 'Document Summary' will be used by the system asdescriptionUsing. If the "Document Summary" is left blank, the system will also intelligently extract the first 150 characters from the document content as a description, greatly reducing the workload of content editing.

Document CategoryThe TDK settings are located in the 'Content Management' 'Document Category' editing interface, and the fields of 'SEO Title', 'Keywords', and 'Category Introduction' can also be found in 'Other Parameters'.These settings will be applied to all list pages under the category and will also be prioritized on the category detail page.

single pageThe TDK settings are located under 'Page Resources' in 'Page Management'.Editing any single page also provides fields such as "SEO Title", "Keywords", and "Single Page Description" to ensure that each individual page can have a unique SEO configuration.

In the template, dynamically call TDK information

In the Anqi CMS template system, we use the powerful "Universal TDK Tag"{% tdk %}To implement the dynamic acquisition and display of TDK.The smartness of this label lies in its ability to automatically retrieve the most suitable TDK data without requiring manual judgment of the current page type.<head>Area to ensure that search engines can correctly crawl.

[en] Call page title (Title)

The page title is one of the most important elements of SEO, we use{% tdk with name="Title" %}to obtain. This tag also supports some practical parameters to control the display of the title:

  • siteName=trueThis will append the website name after the page title, for example, “Article Title - Website Name”. This is very useful for brand exposure. By default, this parameter isfalse, will not attach the website name.
  • sep="_": Can customize the separator between the page title and the website name, the default is a hyphen.-.
  • showParent=true: If set on the article or category page,trueIf so, the parent category title will be included in the title, forming a longer breadcrumb-style title, such as "Article Title - Category Title - Website Name".
<title>{% tdk with name="Title" siteName=true sep=" | " showParent=true %}</title>

The above code will dynamically generate a complete title similar to 'Current Page Title | Parent Category Title | Website Name'.

Call Page Keywords (Keywords)

Page keywords are mainly through<meta name="keywords">Label display, although its SEO weight is not as strong as before, it is still an important part of page content summary.

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

This label will be automatically filled with the keywords set for the current page by the background.

Call Page Description (Description)

The page description is a brief summary below the title in search engine results, which is crucial for attracting users to click. We use{% tdk with name="Description" %}to call it.

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

The system will prioritize using the description set for the current page by the background, if not available, it will trace back by level or automatically extract the introduction.

Call page specification link (CanonicalUrl)

The canonical URL (Canonical URL) is used to indicate the preferred version of a search engine page, effectively avoiding duplicate content issues and is crucial for SEO.

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

Here we first assign the specification link to a variablecanonicaland then through{% if canonical %}Determine if it exists, only output when the specification link exists<link rel="canonical">Tags, this is a robust practice method.

TDK content intelligent filling mechanism

The strength of AnQi CMS lies in its intelligent TDK filling mechanism. Even if the operation personnel do not manually set SEO titles, keywords, and descriptions for each page, the system can still ensure that the page has reasonable TDK information:

  • Title:If the page does not have a clear SEO title, the system may revert to the page's own title (such as the article title, category name, single page name), and combine it with the website name to form a complete<title>.
  • Description:If the "Document Summary" or "Single Page Summary" is not set for the document or page, the system will automatically extract the first 150 characters of the content as a description, to ensure that the page does not lack a descriptiondescriptionLabel.
  • Keywords:If no keywords are set, tags may be left blank or use the system default configuration.

This intelligent filling greatly reduces the workload of operation personnel while ensuring the basic integrity of the website SEO.

Summary

It is an intuitive and powerful process to dynamically set and call TDK in AnQi CMS. By fine-tuning the TDK configuration for the homepage, articles, categories, and single pages in the background, and combining it with the flexible template in the{% tdk %}Tags, we can easily implement high-quality page TDK management.This not only helps to improve the visibility and ranking of the website in search engines, but also attracts target users through precise titles and descriptions, bringing sustained traffic and business growth to the website.As a website operator, being proficient in these TDK settings and calling techniques will be a powerful weapon for optimizing your website's SEO and enhancing the effectiveness of content marketing.


Common Questions and Answers (FAQ)

1. If a page (such as a newly published article) does not have SEO title, keywords, and description set separately in the backend, what will be displayed on the front-end page?

The Auto CMS adopts a priority backtracking mechanism to handle this situation.When a page does not explicitly set TDK, the system will try to obtain TDK information from its category.If the category is not set either, the final fallback will be to the global TDK defined in the background "Home TDK Setting".For description, if there is no introduction set for the article or single page, the system will automatically extract the first 150 characters from the page content as the default description.This mechanism ensures that each page has at least a set of basic TDK, avoiding the loss of SEO elements.

2. In the template, using{% tdk %}tags instead of direct usage{{archive.SeoTitle}}or{{category.Description}}what is the difference from calling TDK fields?

{% tdk %}The label is the 'universal' label provided by Anqi CMS, and its main advantages lie in intelligence and versatility.It will automatically judge and obtain the most relevant TDK data based on the current request page type (homepage, article detail page, category list page, single page, etc.).{% tdk with name="Title" %}The article's SEO title will be automatically retrieved; on the category page, the category's SEO title will be automatically retrieved.{{archive.SeoTitle}}or{{category.Description}}Such variables are specific toarchiveorcategoryThe object exists and is only valid in the corresponding page context, more suitable for use within loops or specific data retrieval tags.<head>Area, recommended for use.{% tdk %}Labels, as they are more general and robust, able to adapt to the TDK acquisition needs of different page types.

3. I have set the 'SEO title' for the article in the background, but on the front-end page,<title>Tag in it, it always adds the website name at the end of my article title, how can I control it to only display the article title?

This is because{% tdk with name="Title" %}The default tag may be affectedsiteNameParameters affect. If you only want to display the SEO title of the article without adding the site name, you need to set it in the template.siteNameParameter is explicitly setfalse. For example, using{% tdk with name="Title" siteName=false %}Additionally, you can alsosepParameter control separator (default is-), or usingshowParent=falseto avoid displaying the parent category title, thereby achieving complete control over the page title output.