As a senior CMS website operation personnel of an enterprise, I know that high-quality content and excellent search engine optimization (SEO) are the foundation of website success.Among them, the SEO title (Title), keywords (Keywords), and description (Description) of the page, abbreviated as TDK, play a crucial role.They are not only the key for search engines to understand the content of the page, but also important factors to attract users to click.In AnQi CMS, we have a flexible and powerful mechanism to dynamically set and call these TDK information, ensuring that each page gets **good SEO performance.

Understand the TDK hierarchy and priority in Anqi CMS

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

First, the website existsGlobal TDK settingsThis is mainly reflected in the "Home Page TDK Settings" on the back end. The title, keywords, and descriptions set here will serve as the default TDK for the website, especially suitable for the home page.

Secondly, for specific content entities such asarticles, products, categories, single pagesThe AnQi CMS provides independent TDK settings options.For example, in the "Publish Document" interface, the "Other Parameters" section allows us to set the "SEO Title", "Document Keywords", and "Document Description" (usually as Description) for a single article.Similarly, document categories and single pages also have their own SEO title, keywords, and introduction fields that can be configured.

When the user visits a page, Anqi CMS will prioritize using the TDK at the content level of the page itself.If the page does not have a separately set TDK, the system will intelligently backtrack to the TDK of its category, and if the category is also not set, it will eventually fallback to the global TDK of the website.This priority mechanism ensures that each page can have a reasonable TDK, even if the operator fails to configure each one, the system can still provide basic SEO information.

精细化管理TDK in the background

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

ForHome pageWe can navigate to the 'Home 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.

TargetArticles, products and other documents.When 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'stitleContent label, the independent "document keyword" field is used to fillkeywordswhile the "document summary" will be used by the system asdescriptionUse. If the 'Document Description' is left blank, the system will 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 'SEO Title', 'Keywords', and 'Category Description' fields can also be found in the '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'.When editing any single page, the same fields such as "SEO title", "keywords", and "single page introduction" are provided to ensure that each independent page can also have a unique SEO configuration.

Dynamically call TDK information in the template

In the Anqi CMS template system, we use the powerful "Universal TDK tag"{% tdk %}To implement the dynamic acquisition and display of TDK. The intelligence of this tag lies in the fact that it can automatically obtain the most suitable TDK data without manual judgment of the current page type.usually, these tags are placed in the template file's<head>area to ensure that search engines can correctly crawl.

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=true: The website name will be appended to the page title, for example, "Article Title - Website Name". This is very useful for brand exposure. By default, this parameter isfalsewill not append the website name.
  • sep="_": You 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 it will be included in the title, the parent category title will be formed to form a longer breadcrumb title, such as "Article Title - Category Title - Website Name"。
<title>{% tdk with name="Title" siteName=true sep=" | " showParent=true %}</title>

The 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">The tag display, although its SEO weight is not as good as before, is still an important part of page content summary.

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

This tag will automatically fill in the keywords set for the current page in the background.

Call page description (Description)

The page description is a snippet below the title in search engine results, crucial for attracting user clicks. We use{% tdk with name="Description" %}to call.

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

The system will prioritize using the description set for the current page in the background, if none is available, it will backtrack based on the hierarchy or automatically extract the summary content.

Call page specification link (CanonicalUrl)

The canonical URL is used to indicate the preferred version of a page to search engines, 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 variablecanonicalThen proceed{% if canonical %}Determine if it exists, only output when the specification link exists<link rel="canonical">Tag, this is a robust practice method.

The intelligent filling mechanism of TDK content

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 ensure that the page has reasonable TDK information:

  • Title:If the page does not have an explicit 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 or page has not set 'Document Description' or 'Single Page Description', the system will automatically extract the first 150 characters of the content as a description to ensure the page does not lack itdescription.
  • Keywords:If the keyword is not set, the label 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's SEO.

Summary

Setting and calling TDK dynamically in AnQi CMS is a straightforward and powerful process. By fine-tuning the TDK configuration for the homepage, articles, categories, and single pages in the background, and combining it with the flexible template.{% tdk %}Label, we can easily achieve high-quality page TDK management.This not only helps to improve the visibility and ranking of the website in search engines, but also can attract target users through precise titles and descriptions, bringing continuous traffic and business growth to the website.As a website operator, mastering these TDK settings and calling skills will be a powerful weapon for optimizing your website SEO and enhancing the effectiveness of content marketing.


Frequently Asked Questions (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 frontend page?

AnQi CMS uses a priority backtracking mechanism to handle this situation.When a page does not explicitly set TDK, the system will try to obtain the TDK information from its category.If the category is not set either, it will fallback to the global TDK defined in the background "Home TDK Settings".For the description, if the article or single page does not set a brief introduction, the system will also intelligently 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, use{% tdk %}tags and direct use{{archive.SeoTitle}}or{{category.Description}}What is the difference between calling TDK fields?

{% tdk %}The tag is a "universal" tag provided by Anqi CMS, and its main advantages lie in intelligence and versatility.It will automatically judge and obtain the most relevant TDK data according to the current page type (home page, article detail page, category list page, single page, etc.).For example, on the article detail page,{% tdk with name="Title" %}The SEO title of the article will be automatically obtained; on the category page, the SEO title of the category will be automatically obtained. And{{archive.SeoTitle}}or{{category.Description}}This variable is specific toarchiveorcategoryThe object exists and is only valid in the corresponding page context, more suitable for use within loops or specific data retrieval tags. In<head>an area, recommended for use{% tdk %}The tag, because it is more general and robust, can adapt to the acquisition needs of TDK for different page types.

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

This is because{% tdk with name="Title" %}The tag may be affected by defaultsiteNameParameter effect. If you only want to display the SEO title of the article without adding the website name, you need to set it in the template.siteNameThe parameter is explicitly set tofalseFor example, use{% tdk with name="Title" siteName=false %}Additionally, you can alsosepParameter control separator (default is-), or useshowParent=falseTo avoid displaying the parent category title, thus achieving complete control over the output of the page title.