How to customize the title display format of AnQiCMS article detail page to meet SEO requirements?

Calendar 👁️ 88

In website operation, the title of the article detail page (<title>Tags are crucial for search engine optimization (SEO).A well-designed title can not only improve the click-through rate of the article in the search results, but also help search engines better understand the page content.AnQiCMS provides a flexible mechanism that allows you to easily customize the title display format of the article detail page according to your own SEO strategy.

This article will introduce how to adjust the title of the article detail page in AnQiCMS to meet different SEO requirements.

One, understand the title structure of AnQiCMS

In AnQiCMS, the title of the article detail page usually consists of several parts, such as the article title, the category name it belongs to, and the website name, etc. By default, AnQiCMS will automatically generate according to the content you fill in when you publish the article and the global system settings.<title>.

AnQiCMS provides a universal tag for controlling page title, keywords, and descriptions (TDK)tdkThis tag is the core tool for custom title display format.In addition, when editing each article in the background, you can set a 'SEO Title' field, which gives you the ability to define an independent title for a specific article.

Second, use the SEO title field of the article itself

The most direct and highest priority way to customize the title is to use the 'SEO title' field of each article.

When you publish or edit an article, you will see an 'SEO Title' input box within the 'Other Parameters' collapse box.Operation method:

  1. Log in to the AnQiCMS backend.
  2. Go to 'Content Management' -> 'Document Management'.
  3. Click "Add new document" or edit an existing document.
  4. On the document editing page, find the "Other parameters" section and expand it.
  5. In the 'SEO Title' field, enter the title you want to display on the article detail page<title>The full title in the tag.

Effect:If you fill in content here, AnQiCMS will prioritize using this field as the title of the article detail page, and ignore the default article title.This is very suitable for the scenario where it is necessary to write highly optimized SEO titles for specific articles that may be slightly different from the actual title of the article.

3. Adjust the TDK tag in the template file

If your title strategy requires more global or dynamic control (for example, all articles follow the format "Article Title - Category Name - Website Name"), then you need to modify the template file.

AnQiCMS template is based on Django template engine syntax, which means you can control the display of content through simple tags. The template files for article detail pages are usually located in the template theme directory of yourarchive/detail.html.

Operation steps:

  1. Locate the template file:

    • Access your AnQiCMS installation directory via FTP or a file management tool.
    • EntertemplateThen find the template theme name you are currently using (for exampledefault)
    • In the template theme folder, findarchivefolder, in whichdetail.htmlthe file is the template for the article detail page.
    • Suggestion:Before modifying any template file, please make sure to back up the original file to prevent any operation errors.
  2. Modify the title tag:Open.detail.htmlFile, you usually will find in<head>Find similar within the tag<title>...</title>The structure. This is where we need to modify.

    AnQiCMS providedtdkTags to help you build titles. Here are several common custom title formats and their implementation methods:

    • Only display the article title (SEO title preferred):This istdkThe default behavior of tags, it will prioritize the use of the article's 'SEO title', if not set, then use the article's own title.

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

      This way can ensure that your page title is concise and clear, directly highlighting the article theme.

    • Article title + Website name:The title format of many websites is "Article Title - Website Name". This helps to enhance brand exposure.

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

      siteName=trueThe parameters will telltdkThe tag is automatically added after the article title, as configured in the "Background Settings" -> "Global Settings" of the "Website Name".

    • Article Title + Separator + Website Name:If you want to use a separator other than the default (which is-), you cansepSet the parameters.

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

      Here, the separator has been changed to|.

    • Article title + Parent category title + Website name:For articles with deeper levels or category information helpful for SEO, the parent category title can be displayed.

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

      showParent=trueThe parent category title will be displayed after the article title.

    • More flexible custom combinations (usingarchiveDetailandsystemTag):IftdkThe options provided by the tags still cannot meet your very special title combination needs, you can callarchiveDetailTags to get article details, as well assystemThe tag retrieves the global information of the website and then manually assembles the title.

      For example, you may need to display the format: "Article Title - Website Name - Website Description".

      {% archiveDetail articleTitle with name="Title" %} {# 获取文章标题 #}
      {% system siteName with name="SiteName" %} {# 获取网站名称 #}
      {% tdk siteDescription with name="Description" %} {# 获取网站描述,这里我们借用tdk标签来获取description #}
      <title>{{ articleTitle | default:"" }} - {{ siteName | default:"" }} - {{ siteDescription | default:"" }}</title>
      
      • This has been usedarchiveDetailGet the article title (prefer SEO title, followed by actual title).
      • systemTags are used to retrieve the "website name" from global settings.
      • tdkThis label can be used to obtain the description of the page.
      • default:""Filter (fromfilter-default.md) is used to prevent output when the variable is emptynil, making the page display cleaner.
      • Note: This manual concatenation method requires you to handle the priority of SEO titles and article titles, as well as the acquisition of category names (which can be achieved throughcategoryDetailtags).
  3. Save and test:Save the modifieddetail.htmlFile, and upload it to the server (if you are modifying it locally). Then visit the article detail page of the website and check if the browser tab title is displayed as expected.

Four, Summary of Operation Steps

  1. Determine the SEO strategy:Clarify the format and information you want the article detail page title to follow.
  2. Use the "SEO Title" field:For cases that require fine control of a single article's title, fill in the "SEO Title" field directly when editing the article in the background.
  3. Modify the template file:For title formats that apply globally or in bulk, locate and edit.template/{你的模板主题}/archive/detail.htmlfile.
  4. UsetdkTags:Select or combine based on the above exampletdkUse the parameters of the tag to generate the title format you want
  5. (Optional) Manually combine:IftdkIf the tag does not meet the requirements, proceed througharchiveDetail/categoryDetail/systemWait and manually retrieve the data and concatenate the tags.
  6. Save and test:Refresh the article detail page and check if the browser title meets the expectation.

5. Notes

  • Template backup:Before modifying any template file, be sure to make a backup.
  • Clear the cache:

Related articles

Does the `urlize` filter apply to processing URLs in a large amount of user-generated content (UGC)?

## The `urlize` filter of AnqiCMS: An intelligent assistant for URL processing in UGC content and operational considerations In the current era where content is king, user-generated content (UGC) has become an indispensable part of the website.From comments, forum posts to user submissions, the vast amount of UGC greatly enriches the website ecosystem.However, the problem that follows is the handling of URLs in the content.

2025-11-09

Can you disable the `urlize` filter from automatically adding `rel="nofollow"`?

When using Anqi CMS for content creation, the `urlize` filter is undoubtedly a very convenient feature.It can intelligently recognize URLs or email addresses in article content, automatically converting them into clickable hyperlinks, saving the麻烦 of manually adding links.However, careful friends may notice that these links automatically generated by `urlize` will default to having the `rel="nofollow"` attribute.

2025-11-09

How does the `urlize` filter-generated link perform in terms of browser compatibility?

As an indispensable security CMS user in daily content operation, we often need to ensure that the content we publish is consistent and professional across various terminals and browsers.Among them, the handling of links is a seemingly simple but actually important detail.Today, let's delve into how the `urlize` filter generates links in Anqi CMS and how they perform in terms of browser compatibility. --- ### The "urlize" filter of Anqi CMS: Do the links you generate display perfectly in all browsers?As a content operator

2025-11-09

How to apply the `urlize` filter to parse URLs in the output of a custom content model field?

In Anqi CMS, the flexibility of the content model is one of its core strengths, allowing us to create various custom fields to carry specific types of content based on different business needs.When we have customized some fields to store URL links, such as "External Reference Link" or "Download Address of Related Resources", you may find that these links are displayed as plain text on the front-end page by default and cannot be clicked to jump directly.This not only affects user experience, but also fails to fully utilize the value of the link.

2025-11-09

What methods does AnQiCMS support to accurately control the display of keywords and descriptions of website content in search results?

In today's highly competitive online environment, making website content stand out in search engines is a focus for every operator.Precisely controlling the keywords and descriptions of website content is a key strategy to improve search visibility, attract target users, and optimize click-through rates.AnQiCMS as an enterprise-level content management system provides multi-dimensional, in-depth functional support, allowing you to flexibly and meticulously manage the SEO performance of your website.

2025-11-09

How to configure unique display fields for different content models in AnQiCMS to adapt to personalized content display?

In AnQi CMS, it is a crucial function to configure unique display fields for different content models to meet the diverse needs of website content display.This capability allows us to flexibly customize the structure of articles, products, activities, or any other type of content based on specific business requirements, thereby providing a highly personalized content display experience.Understanding Content Model: The Foundation of Personalized Display One of the core advantages of AnQiCMS is its 'flexible content model'.

2025-11-09

How to implement multi-language content switching and display for AnQiCMS to serve global users?

Under the wave of global digitalization, your website can communicate seamlessly with users worldwide in multiple languages, which is no longer a luxury but a key step to expanding the international market and enhancing brand influence.AnQiCMS (AnQi CMS) was born to meet such needs, it provides a flexible and efficient solution that makes the switching and display of multilingual content simple and powerful. ### How to build a multilingual content system in AnQiCMS?

2025-11-09

How to use the pseudo-static feature of AnQiCMS to optimize the URL structure to improve the crawling and display effect of search engines?

## Utilizing AnQiCMS's SEO-friendly URL structure: A practical guide to improving search engine crawling and display effectiveness in the digital marketing wave In today's digital marketing wave, Search Engine Optimization (SEO) has become one of the key factors for website success.A clear, friendly, and semantically rich URL structure is undoubtedly the cornerstone of improving a website's SEO performance.It not only helps search engines crawl and understand your content more efficiently, but also significantly improves the reading experience and memorability of users.

2025-11-09