What fields are available in each link item of the AnQiCMS breadcrumb navigation?

📅 November 6, 2025 👁️ 68

AnQiCMS as an efficient and flexible enterprise-level content management system, also considers the details of content display thoroughly.For the user experience and SEO optimization of a website, clear breadcrumb navigation (Breadcrumb Navigation) is an indispensable part.It not only helps users understand their position on the website, but also provides clear website structure information for search engines.Today, let's discuss in detail what fields are available for each link item (item) in the AnQiCMS breadcrumb navigation.

You will use in the AnQiCMS template design,<breadcrumb>Label to generate breadcrumb navigation. This label is designed to be simple and practical, and it will automatically build a hierarchical path list for you.

Basic Breadcrumb Navigation Tag of AnQiCMS

First, let's understandbreadcrumbSome main parameters of the tag itself, which affect the display of the entire breadcrumb navigation.

When you call the breadcrumb navigation in the template, it is usually used like this:

{% breadcrumb crumbs with index="首页" title=true %}
    <ul>
    {% for item in crumbs %}
        <li><a href="{{item.Link}}">{{item.Name}}</a></li>
    {% endfor %}
    </ul>
{% endbreadcrumb %}

here,breadcrumbTag throughcrumbsThis variable is used to pass the generated navigation data. In addition, it accepts some parameters to help you better control the display effect:

  • indexparameters:This parameter allows you to customize the display text of the 'Home' in the breadcrumb navigation.By default, it will be displayed as "Home".index="我的博客".
  • titleparameters:Used to control whether the current page title is displayed in the breadcrumb navigation. When you set it totruethe last item in the navigation path will display the full title of the current page; set tofalseIt will not be displayed. More flexible is that you can also directly assign it a custom string, such astitle="文章详情"This will always display 'Article Details' regardless of the current page title. By default, this parameter istrue.
  • siteIdparameters:For users who use the AnQiCMS multi-site management function,siteIdIt is an advanced option. It allows you to call breadcrumb data from other sites on the current site. But in most single-site scenarios, you usually do not need to fill in or modify it.

After understanding these tag-level controls, we can delve into the specifics of each breadcrumb link item (item) to see what information they provide.

Breadcrumbs link item (item) available field

WhenbreadcrumbLabel fills navigation data into thecrumbsvariables when,crumbsIt will be an array containing multiple link items (or more accurately, a slice). In the template, you will usefora loop to iterate over thiscrumbsarray to get each oneitemAnd from which we extract the necessary fields to construct the HTML structure.

EachitemBoth provide two core and crucial fields, which are:

  1. NamefieldThis field, as the name implies, stores the current link item in the breadcrumb path.Display text. Whether it is the "home page", "news center", "product details", or a specific article title, these visible texts for users are stored inNamethe field. In the template, you will use it directly{{ item.Name }}to retrieve and display it.

  2. LinkfieldwithNameThe field that complements it isLinkThe field, it saves the complete URL address pointed to by thecomplete URL address. When a user clicks on any item in the breadcrumb navigation, it will jump toLinkthe page corresponding to the field. In the template, you will use it for<a>label'shrefproperties, such as<a href="{{ item.Link }}">{{ item.Name }}</a>.

The design philosophy of AnQiCMS breadcrumb navigation is to maintain the simplicity and efficiency of its core functions.Therefore, each link item defaults to providing these two basic but essential fields: display name and jump link.

Let's go through a common template code snippet to see how these fields are applied in practice:

<nav aria-label="breadcrumb">
    <ol class="breadcrumb">
    {% breadcrumb crumbs with index="我的网站" title=true %}
        {% for item in crumbs %}
            <li class="breadcrumb-item">
                {% if forloop.last %} {# 判断是否是最后一个链接项,通常是当前页面,不需要链接 #}
                    {{ item.Name }}
                {% else %}
                    <a href="{{ item.Link }}">{{ item.Name }}</a>
                {% endif %}
            </li>
        {% endfor %}
    {% endbreadcrumb %}
    </ol>
</nav>

In this example, we iteratecrumbsover an array, with each loop getting an elementitemObject. We useforloop.lastto determine the currentitemwhether it is the last item in the breadcrumb path (i.e., the current page). If so, only the text is displayed without adding a link; otherwise, both are used.item.Linkanditem.NameBuild a clickable link.

In summary, the breadcrumb navigation of AnQiCMS passes throughNameandLinkThese two concise and powerful fields provide all the basic information needed to build a clear and intuitive navigation path.This design allows template developers to easily integrate and customize the breadcrumb navigation style, while ensuring the website's usability and SEO-friendliness.

Frequently Asked Questions (FAQ)

  1. Q: Can I change the text of 'Home' in the AnQiCMS breadcrumb navigation to another name? A:Of course. You just need to usebreadcrumbthe tag whenindexSet the parameters. For example, if you want to display "Home" as "Website Home Page", you can write it like this:{% breadcrumb crumbs with index="网站主页" %}.

  2. Q: Does the last item of breadcrumb navigation always display the title of the current page? Can I control it? A:Yes, you can control it completely.breadcrumblabel'stitleThe parameter is designed for this. By default,titleis set totrueIt will display the actual title of the current page. If you do not want to display the title, you can set it totitle=false. More flexibly, you can also specify a string directly, such astitle="文章详情页"And so, no matter what the specific title of the current page is, the last item of the breadcrumb will display the text you customize.

  3. Q: If I need the breadcrumb link to include other information besides the name and link (such as icon class name), does AnQiCMS support these fields in the breadcrumb link item itself? A:AnQiCMS breadcrumb navigation each link item(item)only provides by defaultNameandLinkTwo core fields. If your design requires each link item to carry additional custom data (such as the CSS class name for displaying icons), you may need to consider handling it through conditional judgment or custom logic at the template level, rather than directly fromitemGet from the object. For example, you can useitem.NameThe value to dynamically add icon classes. If a deeper integration is needed, it may be necessary to conduct secondary development on the AnQiCMS underlying code to expand the breadcrumb data structure.

Related articles

What data structure does the `crumbs` variable represent in AnQiCMS breadcrumb navigation tags?

As an expert well-versed in website operation, I know that every detail can affect user experience and SEO optimization (SEO) effects.Breadcrumb navigation is one of those seemingly insignificant but actually crucial elements.It can not only help users clearly understand their location on the website but also provide important clues for search engines about the website structure.In AnQiCMS, a corporate content management system known for its efficiency and flexibility, how can you elegantly and accurately implement breadcrumb navigation?

2025-11-06

How to obtain and traverse the name and URL of each level link in the AnQiCMS breadcrumb navigation?

As an experienced website operations expert, I am well aware of the importance of breadcrumb navigation for website user experience and search engine optimization (SEO).It can not only help users clearly understand their position on the website, but also guide search engines to better crawl and understand the hierarchical structure of the website.AnQiCMS (AnQiCMS) took this into consideration from the very beginning of its design, providing a powerful and flexible breadcrumb navigation feature.Today, let's delve deeply into how to easily obtain and traverse each level of the breadcrumb navigation link names and URLs in AnQiCMS.

2025-11-06

What values and effects does the `title` parameter support in the AnQiCMS breadcrumb navigation tag?

In the daily operation of website management, we know that an excellent user experience cannot be separated from clear and intuitive navigation design.Among them, Breadcrumb Navigation, with its concise and clear path guidance, can not only effectively enhance the user's sense of direction on the website, reduce the possibility of getting lost, but also plays an important role in Search Engine Optimization (SEO), helping search engines better understand the structure of the website.In AnQiCMS (AnQi CMS)

2025-11-06

How to control whether the AnQiCMS breadcrumb navigation displays the title of the current page?

In website operation, user experience (UX) and search engine optimization (SEO) are always the core concerns.Breadcrumbs navigation is an essential part of the website structure, playing an indispensable role in both aspects.It not only helps visitors quickly understand their position on the website, effectively preventing "getting lost", but also provides clear guidance on the website's hierarchical structure for search engines.As an experienced website operations expert, I know that even the seemingly trivial details can have a huge impact on the overall effect of the website

2025-11-06

How does AnQiCMS reflect the data structure of multiple sites through breadcrumb navigation tags?

As an expert who deeply understands website operation, I know what a high-efficiency and flexible content management system means to enterprises and operators.AnQiCMS (AnQi Content Management System) is a powerful tool that not only boasts a high-performance architecture based on the Go language, but also provides many excellent features in the content management layer. Among them, the clever combination of 'Multi-site Management' with 'Breadcrumbs Navigation Tags' is a highlight that reflects complex data structures, enhances user experience, and improves SEO performance.###

2025-11-06

In the AnQiCMS multi-site management environment, how does the `siteId` parameter affect the generation of breadcrumb navigation?

As an experienced website operations expert, I know that every parameter setting in a complex website architecture can have a profound impact on user experience and SEO.Today, we will delve deeply into how the `siteId` parameter of AnQiCMS (AnQiCMS) cleverly affects the generation of the indispensable breadcrumb navigation on our website in a multi-site management environment.### The Foundation of Multi-Site Management in AnQiCMS Among the powerful features of AnQiCMS, 'Multi-Site Management' is undoubtedly a highlight

2025-11-06

How does AnQiCMS breadcrumb navigation help with understanding the site hierarchy and SEO optimization?

In the ever-changing world of the Internet, the success of a website does not only depend on the quantity of its content, but also on the way it organizes content and the efficiency of users obtaining information.As an experienced website operations expert, I am well aware of the importance of clear hierarchy and convenient navigation.Today, let's discuss how AnQiCMS (AnQi CMS) Breadcrumb Navigation plays a key role in these two aspects, thereby helping the website to be better understood by users and favored by search engines

2025-11-06

How to ensure that the AnQiCMS breadcrumb navigation path is consistent with the website's pseudo-static URL structure?

In the vast ocean of information on the website, breadcrumb navigation is like a guiding lamp, which not only clearly tells the user their current location, but also greatly enhances the usability and SEO effect of the website.For enterprise sites built using AnQiCMS, ensuring that the breadcrumb navigation path is consistent with the website's pseudo-static URL structure is a key step in achieving these goals.This is not only about user experience, but also the foundation for search engines to understand the structure of websites and improve crawling efficiency.

2025-11-06