As an experienced website operations expert, I am well aware of the importance of breadcrumb navigation in website user experience and search engine optimization.It not only indicates the current position for users, provides a convenient return path, but also provides important clues for search engines about the website structure.AnQiCMS has given full consideration to the intelligence, automation, and high customizability in the design of the 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 categories of articles, the paths of single pages, etc.
In the case where we do not specify it, AnQiCMS' breadcrumb navigation will display a very intuitive and user-habit-compliant behavior pattern:
- The starting point is clear, default "Homepage":No matter which page the user is on the website, the starting point of the breadcrumb navigation is usually your website's 'home page'.This provides users with a clear starting point, making it convenient for them to 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 up level by level:The navigation path starts from the current page and intelligently traces back to the parent category, grandparent category, and so on, until it reaches the top-level category or root directory of the website.This trace mechanism ensures the completeness and logic 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 the user clearly know their specific location.
Dynamic depth and content structure association
Regarding the depth of breadcrumb navigation, AnQiCMS does not simply limit it to two or three levels, but dynamically decides according to the actual hierarchical structure of your website content. This means that the depth of the breadcrumbs is closely related to the nested relationship of categories, documents, single pages, and other contents configured in your backend:
- For article or product detail pages:If your article or product is located in a multi-level category (for example: Home > Product > Electronic Product > Phone > Brand A > Specific Product), AnQiCMS will accurately display all these levels up to the final product title.The depth of the hierarchy is entirely dependent on the classification nesting depth of the content model.
- For category list pages:If the user is visiting a category page (for example: Home > Electronics > Phone), the breadcrumb will display all parent paths from the home page to the current category.
- For a single page: Generally, single-page pages (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 hierarchical depth processing ensures that no matter how complex or simple the structure of your website's content is, the breadcrumb navigation can accurately and completely reflect the user's position, neither will there be insufficient levels causing missing path information, nor will there be meaningless excessive levels.
How to customize breadcrumb navigation display
AnQiCMS through 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 the breadcrumbs:
indexparameters:Used to customize the breadcrumb navigation starting point. For example, if you want to display "Home" as "My Blog" or "Website Homepage", you can set it like this:{% 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 complete title of the current page will be displayed as the last element of the breadcrumb.title=false:The title of the current page will not be displayed, 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 general 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 a AnQiCMS system deployed with multiple sites, if you need to call data from other sites in a specific site to generate breadcrumbs, you can do so bysiteIdThe parameter specifies the target site ID. In a regular single-site case, this parameter is usually not set.
By these flexible parameters, you can easily adjust the visual presentation and information emphasis of the breadcrumb navigation, making it perfectly integrate into your website design and serve specific operational objectives.AnQiCMS is committed to providing this intelligent and flexible coexistence solution, making it easier for website operators to manage content and build websites.
Frequently Asked Questions (FAQ)
Ask: 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 visiting (such as an article or a single page) has not been assigned to any category, or it belongs directly to the top-level category, and there is no deeper category hierarchy under the content model.AnQiCMS's breadcrumb navigation will strictly generate paths according to the actual hierarchical structure of your content.If you want it to display more levels, make sure your article or product is correctly categorized into a multi-level classification system.
Ask: Can I change the separator between each level of breadcrumb navigation (for example, from “>” to “/”)?Answer: AnQiCMS breadcrumb label
breadcrumbwhat it provides iscrumbsAn array that contains the names and links of each level. The actual separators (such as>or/) are not controlled by the tag parameters directly, but by the iteration in the templatecrumbsHow to write HTML and CSS styles when using an array. You can in{% for item in crumbs %}a loop, in<li><a href="{{item.Link}}">{{item.Name}}</a></li>Add the separator text or icon you want and use CSS to adjust the style.Ask: Does AnQiCMS breadcrumb navigation support path display under multi-site configuration?Answer: Yes, AnQiCMS breadcrumb navigation tag
breadcrumbSupportsiteIdParameter. If you have configured multiple sites in the background and need to display content from another site in a template of one site (for example, to display the breadcrumb path of a child site on the main site), you can specify the target site bysiteIdTo implement. But in most cases, the breadcrumbs of each site will only display the path of its own site.