What is the difference in the generation logic between the article detail page and the category list page of AnQiCMS breadcrumb navigation?
In a content management system, Breadcrumb Navigation is one of the key elements for user experience and Search Engine Optimization (SEO).It displays the user's position on the website in a clear path, not only helping users quickly understand the website structure but also effectively improving the website's usability and search engine crawling efficiency.As an experienced website operations expert, I deeply understand the exquisite design of AnQiCMS in this detail.Today, let's delve into the intrinsic logical differences in generating breadcrumb navigation on the article detail page and category list page of AnQiCMS.
AnQiCMS provides a powerful and flexiblebreadcrumbThe tag allows developers to easily build and customize breadcrumb navigation in templates. Its basic usage is usually{% breadcrumb crumbs with index="首页" title=true %}...{% endbreadcrumb %}. This tag returns acrumbsAn array that contains the names of each node that constitutes the breadcrumb path(Name) and the links(Link), allowing us to present them in a circular manner. Here theindexThe parameter is used to define the name of the starting point of navigation (usually "Home"), whiletitlethe parameter plays a key role in distinguishing logic for specific page types.
The breadcrumb generation logic on the category list page
When the user browses to the category list page of the website, the breadcrumb navigation generation logic of AnQiCMS aims to clearly display the content hierarchy. It usually follows a path from general to specific:
Starting point: Home pageThe starting point of all breadcrumb navigation is set to the home page by default, through
indexparameters, such as 'Home'.Content model levelRight after the homepage, AnQiCMS will intelligently introduce the name of the "content model" belonging to the current category.For example, if this is a list page under the 'Article' category, the model name 'Article' may appear in the breadcrumb path.This is due to the design of AnQiCMS "Model Name...which will also be displayed in the breadcrumb navigation as the display name at the model level", which helps users understand the nature of the current list content.
Category level pathSubsequently, the breadcrumb navigation will trace back all parent categories according to the hierarchical relationship of the current category.Starting from the top-level parent category, down to the second-level category, and then to the specific category of the current user, each level will be displayed as an independent breadcrumb node with an accompanying link.For example, if the path of an article category is "Home u003e Articles u003e Industry Information u003e Industry Dynamics
In short, the breadcrumb logic on the category list page is a pure hierarchical display, reflecting the hierarchical structure of the website's content categories and guiding users to understand the position of the current category in the overall website architecture.
The breadcrumb generation logic of the article detail page
However, the situation is different on the article detail page. The breadcrumb navigation of AnQiCMS is more refined here, it goes deeper into the specific content of the article itself, and introduces flexible control over whether the article title is displayed:
The starting point and content model levelThe same as the category list page, the breadcrumb on the article detail page also starts with the homepage, followed by the name of the content model it belongs to.
Category level pathIt will fully present the classification hierarchy path of the current article, consistent with the logic of the classification list page.For example, an article titled "AnQiCMS Feature Analysis
Article Title Node (Core Difference)This is the most significant difference between the article detail page and the category list page. After the category path, AnQiCMS will display the current article'sTitlePresented as the last node of the breadcrumb. This not only clearly tells the user the specific content they are browsing, but also provides a more precise page description for search engines.
It is worth noting that,breadcrumblabel'stitleThe parameter plays a key role here.
- If
titleis set totrue(Default value), the last node of the breadcrumb will directly display the full title of the current article. - If
titleis set tofalseThe article title will be omitted, and the breadcrumb will terminate at the category path. - More flexible is,
titleThe parameter can also accept a custom string, such as,title="查看详情".In this case, the article title will not be displayed directly, but will be replaced by this custom text as the last node, which can provide a simpler visual effect in some designs.
Summary of the core differences
In conclusion, the generation logic of AnQiCMS breadcrumb navigation in two types of pages is mainly reflected inThe granularity of the final nodeandThe control method for this granularityUp:
- Category list page:Breadcrumb navigation stops at the current category name, fully displaying its hierarchical path and content model. It emphasizes 'Which content area are you in'.
- Article detail page:Breadcrumb navigation is an additional node representing the current article itself on the basis of the category path, which is usually the article title.It emphasizes which article you are reading.
titleThe parameter allows developers to finely control the display content of the final node.
This design not only conforms to the intuitive understanding of website navigation by users, but also provides sufficient flexibility for website operators in SEO optimization and user experience design.By understanding these subtle differences, AnQiCMS users can better configure and utilize breadcrumb navigation to build a clear and efficient navigation system for the website.
Frequently Asked Questions (FAQ)
Why is the article title not displayed in the breadcrumb of my article detail page?This is usually because you are calling
breadcrumbSet a tag,titleThe parameter is set tofalseor an empty string. Please check the template in{% breadcrumb crumbs with index="首页" title=true %}this line of code to ensuretitlethe parameter is set totrueOr, what custom text do you expect to display.How are the model names such as 'Article', 'Product' in the breadcrumb automatically generated? Can I modify it?These model names are automatically obtained and displayed by AnQiCMS according to the 'content model' of the current page.In the AnQiCMS backend, you can go to the "Content Management" under the "Content Model" settings, find the corresponding model (such as "Article Model" or "Product Model"), where there is a "Model Name" field.You can modify this field to change the name displayed in the breadcrumb.
If my category hierarchy is very deep, will the breadcrumbs display all parent categories? Is there a length limit?Yes, the breadcrumb navigation of AnQiCMS defaults to display all parent categories, fully presenting the complete path from the homepage to the current category or article, with theoretically no fixed length limit.This helps users understand the deep structure.However, in actual design, too long breadcrumbs may affect the page layout, you may need to optimize some in frontend CSS or JavaScript, such as collapsing some paths on mobile devices or only displaying the nearest few levels.