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 the page title (Title) in website operation is self-evident. It is not only the first entry for users to click but also the core basis for search engines to judge the relevance of page content.Today, we will delve into how Anqi CMS cleverly utilizestdkin the labelshowParent=trueThe attribute, enriches the page title with more rich, hierarchical information, thereby effectively improving the website's SEO performance and user experience.

The deep value of the page title: more than just a few words

In the practice of content operation, an excellent page title is far more than a simple summary of the content.It needs to accurately convey the page theme, attract user clicks, and include keywords friendly to search engines, as well as clearly show the position of the page within the website structure.Imagine when a user finds your product through a search engine, a page with a title that only displays 'Product Details' is compared to a page that displays 'Product A - Digital Product - Electronic Products | Your Brand Name'. The latter clearly has more information, not only making it clear to the user the category of the product, but also subtly building the professional image of the brand.

Anqi CMS knows this and therefore in itstdkThe design of the label provides a high degree of flexibility and intelligent hierarchical display capabilities for generating page titles.

tdkwith the tag andTitleThe core function of the attribute

In the AnQi CMS template system,tdk(Title, Description, Keywords) tags are the core tools for setting page meta information.By this tag, we can dynamically generate SEO-compliant titles, keywords, and descriptions for each page of the website. Among them,name="Title"The attribute is specifically used to control the main title of the page.

In most cases, we may only use{% tdk with name="Title" %}To display the current page title. For example, for an article named 'AnQi CMS Quick Start', the page title may be 'AnQi CMS Quick Start'.This is sufficient in some scenarios, but in complex website structures, especially when content has clear hierarchical relationships, such a title may be a bit thin.

Deep understandingshowParent=true: to add hierarchy to the title

Anqi CMS is to solve the above problems, intdklabel'sname="Title"introduced in the propertiesshowParent=trueThis powerful and practical parameter. This seemingly simple attribute, hidden behind it, is the wisdom to inject depth and breadth into the page title.

When we willshowParentis set totrueAt that time, AnQi CMS will intelligently identify the category level of the current page and add the titles of these parent categories hierarchically to the page title.The mechanism of its operation is as follows: For a document (such as an article or product), it will first obtain the title of the direct category to which the document belongs. If the category has a parent category, it will continue to trace up until the top-level category, and integrate all the titles of the parent categories in the order of the hierarchy into the page title.

For example, suppose your website structure is as follows:

  • Electronics(Top Category)
    • Digital Equipment(Subcategory)
      • Smartphone(Subcategory)
        • Article/Product: Review of the latest smartphone

If the article "Review of the latest smartphone" used{% tdk with name="Title" showParent=true %}And you also want to include the website name and a custom separator, then the final page title may be:

<title>最新款智能手机评测 - 智能手机 - 数码设备 - 电子产品 | 您的网站名称</title>

You can see that the title is no longer isolated as a review of the "latest model smartphone", but clearly shows its position in the hierarchy of "Electronic products > Digital devices > Smartphones."}This rich hierarchical information is crucial for search engines to understand the relevance of page content, website structure, and for users to quickly identify your page among many search results.

To better control the display of the title, you can combinesepThe attribute comes from the separator between custom hierarchical titles, for examplesep=" > ", as well assiteName=trueAdd the website name at the end of the title. These detailed settings collectively build a flexible and powerful title generation mechanism.

Actual application scenarios and strategies

showParent=trueProperties can play a huge role in many complex websites, especially suitable for the following scenarios:

  1. Product detail pages on e-commerce websites:Users usually want to know which major category and series a product belongs to.The hierarchical title can clearly show the product classification path, such as "iPhone 15 Pro Max - Smartphone - Mobile Device - Digital Products | Apple Official Store".
  2. Knowledge bases or blogs with deep content:When an article belongs to a series or a sub-branch of a theme, hierarchical titles can help readers better understand the context of the article, such as "Introduction to Deep Learning: Neural Network Basics - Machine Learning - Artificial Intelligence | Technical Blog".
  3. Information portal with multi-level directories:Ensure that each news or special report reflects its channel and column in the title, enhancing the sense of information ownership and navigation.

When using this attribute, website operators should weigh the length and readability of the title.The title is too long and may be truncated in search results, affecting user experience.Therefore, combining the actual classification depth and keyword strategy of the website, use it reasonablyshowParent=true,and cooperatesepOptimizing the attribute is the key to achieving **effect.

Summary

Of Security CMSshowParent=trueThe attribute provides a powerful and convenient tool for website operators to build page titles that are more informative, more in line with user browsing habits, and more favored by search engines.By accurately displaying the hierarchical information of the page title, we can not only effectively improve the website's SEO performance, but also optimize the user's in-site navigation experience, thus standing out in the fierce online competition.


Frequently Asked Questions (FAQ)

1.showParent=trueIs the attribute only effective for document (article/product) pages?Yes,showParent=trueThe attribute is mainly used for generating titles on document detail pages (such as articles, product pages) and category list pages. It depends on the hierarchical structure of the content or category (i.e., havingParentIdThe classification relationship). For independent pages that do not belong to any category (such as "About Us" single pages), this attribute will not generate parent title information.

2.showParent=trueWill it recursively display the titles of all parent categories?Yes, whenshowParent=trueWhen activated, the AnQi CMS will trace back from the current content or category, recursively obtaining the titles of all hierarchical parent categories and integrating them in order of hierarchy into the final page title, until the top-level category.This ensures that the title fully presents all levels of the content path.

3. How to customizeshowParent=trueThe separator between the hierarchical titles generated?You can use it totdklabel'ssepProperties to specify the separator between title levels. For example, if you want to use “>” as the separator, you can set it like this:<title>{% tdk with name="Title" showParent=true sep=" > " %}</title>This will display the title as: "Subcategory Title > Parent Category Title > Top Level Category Title".