The webpage title (Title) is the 'front door' of a website on search engine results pages, it not only directly informs users of the page content, but also serves as an important indicator for search engines to evaluate the relevance and authority of the page.An optimally crafted page title that can significantly improve click-through rates and the website's search engine ranking.In AnQiCMS, you can flexibly control the generation method of page titles, especially adding the website name suffix and custom separators dynamically, to achieve a unified brand image and better SEO effect.

AnQiCMS 中的 TDK (Title, Description, Keywords) Management

In AnQiCMS website operation, Title, Description, and Keywords are the core elements of page SEO.AnQiCMS provides multi-level TDK settings, allowing you to finely control the title of each page.

usually, the basic title of the page comes from the following aspects:

  • content pages (articles, products, single pages, tag pages)In editing this content, you can set the 'SEO Title' field separately for each page. This field has the highest priority.
  • Category PageIn managing categories, you can set the 'SEO title' for each category.
  • Home PageIn the 'Home Page TDK Settings' on the backend, you can set the title, keywords, and description for the website's homepage.

When these 'SEO title' fields are empty, the system will use the title of the content, the category name, or the single page name as the basic title of the page. In the AnQiCMS template, the core tool for managing page titles istdkLabel. This label will automatically obtain the most suitable title content based on the context of the current page (such as article detail page, category list page, or home page).

English

To maintain brand consistency and make it easier for users to identify your website in search engine results, it is usually necessary to add the website name as a suffix to the end of each page title.Adding suffixes manually to each page is not only cumbersome but also prone to errors.AnQiCMS provides a very convenient mechanism to automate this process.

You can put it in the template.<title>use a control character insidetdkTag, and by adding it tositeName=trueProperty, indicating that the system automatically appends the website name you set in the background as a suffix to the page title.This 'website name' comes from the 'global settings' of the 'website name' field in the background.

For example, your template file (usually)base.htmlor the header file of each page) intitleLabel can be set like this:

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

When you set the 'website name' to 'AnQiCMS' in the background 'global settings' and the title of some article page is 'AnQiCMS Function Deep Analysis', the title displayed in the browser tab and search engine results will be: 'AnQiCMS Function Deep Analysis - AnQiCMS'.If the 'SEO title' field of the article is empty, it will use the title set by the article itself and then automatically add the website name suffix.

Custom delimiter

By default, AnQiCMS uses a hyphen "-" as a separator when concatenating the page title and website suffix. If you find that the default hyphen does not match your brand style or you want to use other symbols (such as a vertical bar "|" or an underscore "_"), you can also do so throughtdkTagssepProperties are customized.

For example, if you want to change the delimiter to the vertical bar “|”, you can modify your template code in this way:

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

So, the article title above will be displayed as: “AnQiCMS Function Deep Analysis | AnQi CMS”}]You can flexibly choose an appropriate delimiter according to your preferences and website design specifications.

Comprehensive application and **practice

Combine the dynamic website name suffix and custom delimiter to create a powerful and unified page title generation rule. For example:

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

This way, you can ensure that all page titles adhere to a unified naming convention, which not only helps enhance the professional image of the website but also is greatly beneficial for Search Engine Optimization (SEO).Search engines prefer page titles that are structured clearly and have consistent naming.

For category or document detail pages, you may sometimes also want to include the name of the parent category in the title to provide more context information.tdkLabels are supportedshowParent=trueto achieve this:

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

So, for example, on the detail page of an article under a subcategory, the title may be presented as: "Article Title - Subcategory Name - Parent Category Name - Website Name", thus further enhancing the descriptiveness and hierarchical sense of the title.

Precautions

  • PriorityWhen the 'SEO title' field of the content itself has a value, the priority of this field is the highest.tdkThe tag will use this value first and apply it on top of that.siteNameandsepParameters such as 'auto'. Only when the 'SEO title' is empty,tdkthe tag will generate a basic title according to the page type (article title, category name, single page name, etc.).
  • cacheIn modifying background settings (such as website name) or template code, if the front-end page does not take effect immediately, please remember to clean up the system cache in time.The backend usually has an option like 'Update Cache' or similar to perform this operation.

Through these flexible features provided by AnQiCMS, you can easily achieve professional and SEO-compliant page title management, making your website more competitive in the digital world.


Common Questions (FAQ)

Q1: Why did I setsiteName=trueAfter that, the page title of my website still does not display the suffix?

A:There may be several reasons: first, please make sure that your template includes<title>Tags withintdkthe tag actually containssiteName=trueThis property.其次,check whether the 'Website Name' field in the 'Global Settings' of the background has been filled in.If the field is empty, the system will not be able to add a suffix.Finally, do not forget to clean up the system cache after modifying the background settings or template code to ensure that the changes take effect.

Q2: I only want to display the website name suffix on certain page types (such as article detail pages) and not on other pages, how do I do it?

A:AnQiCMS Allows you to use different template files for different page types. You can only use template files for specific page types that need to display the website name suffix (such asarchive/detail.htmlUsed for article detail pages, orcategory/list.htmlin the category list page)of<title>use a control character inside{% tdk with name="Title" siteName=true %}. For pages that do not need to display suffixes, they can be omittedsiteName=trueattribute, or explicitly set tositeName=false({% tdk with name="Title" siteName=false %}).

Q3: 'SEO title' andtdktags have what relationship? What is their priority?

A:「SEO title」is the independent title setting for a single article, category, or page in AnQiCMS, it has the highest priority. When you fill in the 'SEO title' while editing content,tdkThe label will use this title setting first. Only when the 'SEO title' field on the content page is empty,tdkLabels will be generated based on the page's own title (such as article title, category name, single page name) and apply the one you set intdkthe label settings.siteName(Website name suffix) andsep(Separator) etc. In short, the 'SEO Title' of the specific content page has a higher priority thantdkthe dynamic generation rules of tags.