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 point for users to click but also the core basis for search engines to judge the relevance of page content.tdkIn tags,showParent=trueAttribute, to give the page title more rich and hierarchical information, thereby effectively enhancing the website's SEO performance and user experience.

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

In the practice of content operation, an excellent page title is more than just a simple summary of the content.It needs to accurately convey the page theme, attract user clicks, and include keywords friendly to search engines, while also clearly showing the page's position within the overall website structure.Imagine a page that only displays 'Product Details' when a user finds your product through a search engine, compared to a page that shows 'Product A - Digital Product - Electronic Products | Your Brand Name'. The latter clearly has more information, not only allowing users to see the product category at a glance but also subtly building a professional image for the brand.

AnQi CMS understands this and therefore in itstdkThe design of the label provides high flexibility and intelligent hierarchical display capabilities for generating page titles.

tdkTags withTitleThe core role of the attribute

In the template system of Anqi CMS,tdkThe (Title, Description, Keywords) tags are the core tools for setting page meta-information.Through this tag, we can dynamically generate SEO-compliant titles, keywords, and descriptions for each page of the website.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" %}Display the title of the current page.For an article named "AnQi CMS Quick StartThis is sufficient in some scenarios, but in complex website structures, especially when there is a clear hierarchical relationship between the content, such a title may seem thin.

Deep understandingshowParent=trueto inject level depth for the title

The Aiqi CMS is specifically designed to solve the above problems, and introducestdkthe tag'sname="Title"in the propertiesshowParent=trueThis powerful and practical parameter. This seemingly simple attribute, behind which lies, is the wisdom that injects depth and breadth into the page title.

When we willshowParenttotrueWhen, the Safe CMS will intelligently recognize the category hierarchy of the current page, and add the titles of these parent categories level by level to the page title.The mechanism it works is like this: For a document (such as an article or product), it will first get the title of the direct category the document belongs to, if the category has a parent category, it will continue to trace up to the top-level category, and integrate all the titles of the parent categories in the order of hierarchy into the page title.

For example, suppose the structure of your website is as follows:

  • Electronic Products(Top Category)
    • Digital Devices(Subcategory)
      • Smartphone(Subcategory)
        • Article/Product: Review of the latest smartphone model

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

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

You can see that the title is no longer an isolated 'Latest Smartphone Review', but clearly shows its position in the hierarchy '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 presentation of the title, you can also combinesepThe attribute is used to customize the separator between the levels of the title, for example,sep=" > "as well as,siteName=trueAdd the website name at the end of the title. These fine-tuned settings work together to 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 of e-commerce websites:Users usually want to know which major category and which series a product belongs to.The hierarchical title can clearly display the product classification path, such as 'iPhone 15 Pro Max - Smartphones - Mobile Devices - Digital Products | Apple Official Store'.
  2. Knowledge bases or blogs with a deep content depth: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. Multi-level directory information portal:Ensure that each news article or special report reflects its channel and column in the title, enhancing the sense of information ownership and navigability.

When using this attribute, the website operator should weigh the length and readability of the title.Titles that are too long may be truncated in search results, affecting user experience.showParent=trueand cooperate withsepProperty optimization is the key to achieving **effect.

Summary

Anqi CMS'sshowParent=trueAttribute, 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 precisely displaying page title hierarchy information, we can not only effectively enhance the SEO performance of the website, but also optimize the users' in-site navigation experience, thereby standing out in the fierce online competition.


Common Questions (FAQ)

1.showParent=trueIs the property 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=trueDo you want to recursively display all parent category titles?Yes, whenshowParent=trueWhen activated, the CMS will trace back from the current content or category, recursively obtaining all hierarchical parent category titles and integrating them in the order of hierarchy into the final page title until the top-level category.This ensures that the title fully presents the hierarchical path of the content.

3. How to customizeshowParent=trueThe separator between the generated level titles?You can usetdkthe tag'ssepSpecify the separator between title levels using a property. 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"