As an experienced website operations expert, I am well aware of the important role of breadcrumb navigation in website user experience and search engine optimization.It not only indicates the current location to the user and provides a convenient return path, but also offers important clues about the website structure to search engines.AnQiCMS takes full consideration of its intelligence, automation, and high customizability in the design of breadcrumb navigation, aiming to help operators easily build a clear website hierarchy.
The core logic and default behavior of AnQiCMS breadcrumb navigation
In AnQiCMS, the design concept of breadcrumb navigation is intelligent and automated, which means you do not need to manually configure complex hierarchical relationships for each page.The system will automatically generate logical navigation paths based on the actual structure of your website content, such as the category of the article and the path of a single page.
When there is no special specification, the breadcrumb navigation of AnQiCMS will display a very intuitive and user-friendly behavior pattern:
- The starting point is clear, default 'home page':No matter which page of the website the user is on, the starting point of the breadcrumb navigation is usually your website's 'homepage'.This provides a clear starting point for users to easily return to the root directory of the website at any time.Of course, the text of this 'home page' can be adjusted according to your needs.
- Trace back hierarchically:The navigation path will start from the current page and intelligently trace its parent categories and grandparent categories, up until it reaches the top-level category of the website or the root directory.This trace mechanism ensures the completeness and logicality of the path.
- Default to include the current page title:By default, the last element of the breadcrumb navigation will be the title of the current page, for example, if the user is reading an article named "AnQiCMS Template Creation Guide", the breadcrumb navigation will display "Home > Article Category > AnQiCMS Template Creation Guide".This makes it clear to the user where they are located specifically.
The dynamic depth of the hierarchy is associated with the content structure.
Regarding the breadcrumb navigation depth, AnQiCMS does not simply limit it to two or three levels, but dynamically determines it based on the actual hierarchical structure of your website content. This means that the depth of the breadcrumbs is closely related to the nested relationships of the categories, documents, single pages, and other content you configure in the backend:
- For article or product detail pages:If your article or product is located under multi-level categories (e.g., Home > Product > Electronic Products > Phone > Brand A > Specific Product), AnQiCMS will accurately display all these levels up to the final product title.The hierarchical depth is entirely dependent on the classification nesting depth under the content model.
- For category list pages:If the user is visiting a category page (such as: Home > Electronics > Phone), the breadcrumbs will display all parent paths from the Home page to the current category.
- For single-page:Generally, single-page sections (such as 'About Us', 'Contact Us') do not have complex categorization structures, and their breadcrumb path may be simplified to 'Home > About Us'.
This dynamic depth handling method ensures that no matter how complex or simple the structure of your website content is, the breadcrumb navigation can accurately and completely reflect the user's position, without any missing path information due to insufficient levels or unnecessary excessive levels.
How to customize the breadcrumb navigation display
AnQiCMS via template tagsbreadcrumbProvided flexible customization options, allowing you to adjust the display details of breadcrumb navigation according to the overall design and operation strategy of the website.
In your template file, you will usually use the following tags to call the breadcrumb navigation:
{% breadcrumb crumbs with index="首页" title=true %}
<ul>
{% for item in crumbs %}
<li><a href="{{item.Link}}">{{item.Name}}</a></li>
{% endfor %}
</ul>
{% endbreadcrumb %}
This tag provides several key parameters that allow you to finely control the display of breadcrumbs:
indexParameters:Used to customize the name of the breadcrumb navigation starting point. For example, if you want to display 'Home' as 'My Blog' or 'Website Homepage', you can set it this way:{% breadcrumb crumbs with index="我的博客" %}titleParameters:This parameter determines whether the breadcrumb navigation displays the title of the current page and how it is displayed. It has three common settings:title=true(Default):The last element of the breadcrumb will display the complete title of the current page.title=false:The title of the current page will not be displayed, and the last element of the breadcrumb will be the parent category of the current page.title="自定义标题":If you do not want to display the title of the page itself but instead want to use a generic descriptive text as the last element, you can directly pass a string, for example:
At this moment, regardless of the actual title of the article, the last element of the breadcrumb will display "Article Details".{% breadcrumb crumbs with title="文章详情" %}
siteIdParameters:For AnQiCMS systems that have deployed multiple sites, if you need to call data from other sites to generate breadcrumbs in a specific site,siteIdParameter specifies the target site ID. In the case of a single site, this parameter is usually not needed.
Through these flexible parameters, you can easily adjust the visual presentation and information emphasis of the breadcrumb navigation, making it perfectly integrate with your website design and serve specific operational objectives.AnQiCMS is dedicated to providing a solution that combines intelligence and flexibility, allowing website operators to manage content and build websites more effortlessly.
Common Questions (FAQ)
Why does my breadcrumb navigation sometimes only show "Home > Current Page" without the intermediate category levels?Answer: This is usually because the page you are currently accessing (such as an article or a single page) has not been assigned to any category, or it directly belongs to the top-level category, and there are no deeper category levels under the content model.The breadcrumb navigation of AnQiCMS will generate paths strictly according to the actual hierarchical structure of your content.If you want it to display more levels, make sure your article or product has been correctly categorized into a multi-level classification system.
Question: Can I change the separator between each level in the breadcrumb navigation (for example, from “>” to “/”)?Answer: Breadcrumb tags in AnQiCMS
breadcrumbThe one provided iscrumbsan array that includes the names and links of each level. The actual delimiter (such as>or/) is not controlled directly by the tag parameters, but by your iteration in the templatecrumbsHow to write HTML and CSS styles for arrays is decided. You can in{% for item in crumbs %}loop, in<li><a href="{{item.Link}}">{{item.Name}}</a></li>Add the desired separator text or icon at the end, and adjust the style with CSS.Question: Does the AnQiCMS breadcrumb navigation support path display under multi-site configuration?Answer: Yes, the AnQiCMS breadcrumb navigation tag
breadcrumbSupportsiteIdParameters. If you have configured multiple sites in the background and need to display content from another site in a template of a single site (for example, to show the breadcrumb path of a child site on the main site), you can do so by specifying the target site'ssiteIdTo implement. But in most cases, the breadcrumbs of each site will only display its own site path.