How to add multi-level menus and custom navigation categories in the AnQiCMS website navigation?

Calendar 👁️ 58

As a long-term practitioner who is deeply involved in website operations and has a profound understanding of AnQiCMS (AnQiCMS), I know that a clear and easy-to-use website navigation system is important for user experience and SEO optimization.AnQiCMS provides flexible and powerful navigation management features, allowing operation personnel to easily build multi-level menus and customize navigation categories according to the website structure and user needs.Below, I will elaborate on how to implement these features in AnQiCMS.


Build a clear and orderly website navigation: Practice of AnQi CMS multi-level menu and custom navigation category

The website navigation is the core path for users to explore the website content and is also an important clue for search engines to understand the website structure.A well-designed and well-structured navigation system, which can not only significantly improve the user experience, guide users to quickly find the information they need, but also optimize the efficiency of search engine crawling, helping the website stand out in the fierce market competition.AnQi CMS is well-versed in this, providing website operators with an intuitive and feature-rich navigation management module that supports the creation of multi-level menus and customizable navigation categories to meet the complex needs of various websites.

Flexibility of AnQi CMS navigation management

The navigation settings of AnQiCMS are located in the "Background Settings" area of the background, and the "Website Navigation Settings" is the center of all navigation configurations.The system provides a default "default navigation" category, which is usually used for the main navigation bar of a website.However, in actual operation, a website may need various navigation forms such as footer navigation, sidebar navigation, and even specific topic navigation.AnQiCMS allows for custom navigation categories, greatly broadening the possibilities of navigation design.This means that you can create a completely independent navigation menu for each key area of the website, which do not affect each other and carry specific guidance functions.

Custom navigation category: Meets diverse layout needs

To create a new navigation category, for example, a footer navigation for the website, you just need to go to the "website navigation settings" page in the background, and operate in the "navigation category management" area.Here, you can easily add a navigation category and name it, for example, "Footer Navigation".Once created, this new navigation category is like an empty container, waiting for you to fill it with specific navigation links.In this way, you can plan an independent navigation system for different page areas based on the design layout of the website, thus achieving a more refined and personalized website structure.

Build multi-level menus: Clear hierarchical user experience

After creating the navigation category, the next step is to add specific navigation links and build the hierarchy.AnQiCMS navigation link settings support up to two-level menu structures, which is sufficient to meet the navigation needs of the vast majority of websites.

When you add a navigation link, you first need to determine its level.Through the 'Parent Navigation' option, you can specify whether the current link is a top-level navigation (select 'Top-Level Navigation') or a sub-navigation of an existing navigation item.This intuitive parent-child relationship setting makes it easy to build multi-level menus.For example, you can set 'Product Display' as a first-level navigation, and then add 'Product A', 'Product B' as second-level sub-navigations.

Each navigation link includes rich configuration options. You need to set its "display name", which is the text that users see on the website front end.If your website needs to support dual title display, such as Chinese and English coexisting, you can also fill in the "subheading name".“Navigation description” allows adding a brief introduction to the navigation item, which can be used in some template designs to provide additional information.

Link type is one of the core elements of navigation settings, AnQiCMS provides three main types:

  • Built-in linkLinks of this type point to some special pages preset within the AnQiCMS system, such as the website homepage, article model homepage, product model homepage, and other custom model homepages.This provides convenience for quickly adding commonly used feature links.
  • Category page linkIf you want the navigation items to directly point to a category page or a single page on the website, this option will be very useful.You can select from the categories or single-page lists already created in the system, and the system will automatically generate the corresponding links.
  • External linkFor situations where you need to jump to an external or custom internal URL, external links provide the greatest flexibility. You just need to enter the complete URL address here.

The last, "Display Order" field allows you to control the arrangement position of navigation items at the same level by the size of the number, the smaller the number, the earlier the display.Although drag and drop sorting is not currently supported, you can still accurately control the display order of navigation by adjusting the numbers.

In the template, call the navigation: display the backend configuration on the front end

Navigation information configured on the back-end, which needs to be presented on the front-end web page of the website through AnQiCMS template tags.{% navList navs %}Is used to retrieve and render the navigation list key tag.

In your website template (for example)header.htmlorfooter.htmlYou can call and iterate over the navigation data like this:

{% navList navs with typeId=1 %} {# 假设 typeId=1 是默认导航类别 #}
<ul>
    {%- for item in navs %}
        <li class="{% if item.IsCurrent %}active{% endif %}">
            <a href="{{ item.Link }}">{{item.Title}}</a>
            {%- if item.NavList %} {# 如果存在子导航 #}
            <dl>
                {%- for inner in item.NavList %}
                    <dd class="{% if inner.IsCurrent %}active{% endif %}">
                        <a href="{{ inner.Link }}">{{inner.Title}}</a>
                    </dd>
                {% endfor %}
            </dl>
            {% endif %}
        </li>
    {% endfor %}
</ul>
{% endnavList %}

This code snippet shows how to retrieve and iterate over all navigation items in a navigation category and further check if each navigation item contains sub-navigation (item.NavListIf there is a sub-navigation, it will traverse the sub-navigation items again to build a clear multi-level menu structure. Byitem.IsCurrentYou can also add specific styles to the currently active navigation item to enhance the user interaction experience.

The value of navigation optimization: a win-win for users and search engines.

A well-planned multi-level menu and customized navigation categories, not only are they an embodiment of website aesthetics, but also an important part of the website's operational strategy.For the user, clear navigation reduces cognitive load, improves information acquisition efficiency, thereby enhancing access depth and dwell time.For search engines, a reasonable navigation structure helps the spider better understand the hierarchical relationship and content theme of the website, which is helpful for crawling more pages, increasing the inclusion volume and keyword ranking.These navigation management features provided by AnQiCMS are designed to empower operation personnel, achieving dual optimization of user experience and SEO performance through high-quality website structure.


Frequently Asked Questions (FAQ)

Ask: How many levels does AnQiCMS navigation menu support?Answer: The AnQiCMS backend navigation management function currently supports up to two-level menu structures, that is, a main navigation item can have a layer of sub-navigation.This has provided sufficient flexibility and clarity for the navigation design of most websites.

Ask: I created a new navigation category and link, but it didn't show up on the website front end. What could be the reason?If the navigation is set on the backend but not displayed on the frontend, please check several aspects. First, make sure you are using the correct{% navList navs with typeId=X %}the tags, andtypeIdThe parameter matches the ID of the navigation category you created in the backend. Next, check if there are any syntax errors in the template code, or if there are any condition judgments that prevent the display during the loop traversal of navigation data (for example,{% if item.NavList %}It may cause a parent link to be skipped without any child navigation). Finally, confirm that your AnQiCMS cache has been updated, and manually clear the cache if necessary.

Ask: Does AnQiCMS navigation support using article categories or single pages directly as navigation items?Answer: Yes, AnQiCMS fully supports setting existing article categories or single pages directly as navigation items.When adding or editing navigation links, select the link type as "Category Page Link", and then you can select the category or single page you want to reference from the dropdown list.The system will automatically handle its links, saving the trouble of manually copying and pasting URLs.

Related articles

How to set the download, link filtering, and webp format conversion for content images on AnQiCMS?

As an experienced CMS website operation personnel, I am well aware of the core position of content images in website operation.The quality, loading speed, and management methods of images directly affect user experience and search engine optimization effects.AnQiCMS provides us with powerful and flexible image processing capabilities, especially in image downloading, external link filtering, and format conversion, which can help us efficiently optimize the website's image resources.

2025-11-06

What features does the AnQiCMS backend global settings include, and how to customize parameters?

As a senior security CMS website operator, I know the importance of the background global settings.It is not only the 'brain' of the website, determining the overall performance and operational efficiency of the website, but also the foundation for us to achieve refined content management and optimization.With a proficient grasp and flexible application of these settings, we can ensure the stability and efficiency of the website and quickly adjust strategies based on market and user needs.This article will discuss in detail the core functions included in the Anqi CMS background global settings, as well as how to effectively customize parameters to meet the unique needs of our website.

2025-11-06

How to create, edit, and set custom URLs and templates for AnQiCMS single-page management?

As an experienced website operator who deeply understands the operation of AnQiCMS, I fully understand the importance of efficient website content management, especially for single pages that carry the corporate image, service introduction, or contact information.The AnQi CMS provides intuitive and flexible tools for single-page management, allowing you to easily create, edit, and personalize the URLs and templates of these pages to meet the unique needs of your website.

2025-11-06

How to upload and categorize images and videos in AnQiCMS page resource management?

As a long-term website operator deeply rooted in the AnQiCMS platform, I fully understand the importance of high-quality content and efficient management for the success of the website.In AnQiCMS, properly manage your image and video resources, not only can it make your content more colorful and rich, but also greatly improve the operation efficiency.Next, I will introduce to you in detail how to upload and categorize your images and videos in the page resource management module of AnQiCMS.

2025-11-06

How to configure the Baidu and Bing search engine link active push in AnQiCMS?

As an experienced CMS website operator, I know the importance of search engine主动推送 for the rapid inclusion of website content and SEO optimization.AnQiCMS as a platform focusing on efficient content management, built-in convenient link push function, can help operators timely inform Baidu, Bing and other mainstream search engines of the new released or updated content, thus improving the visibility and crawling efficiency of the website.The following will elaborate on how to configure Baidu and Bing search engine link active push in AnQiCMS.

2025-11-06

What are the pseudo-static rule modes supported by AnQiCMS, and how to customize the URL structure?

As an experienced CMS website operation person in the safety industry, I know that a friendly and efficient URL structure is crucial for the SEO and user experience of the website.AnQi CMS offers a wide range of options in the field of pseudo-static rules, whether it is a ready-to-use preset mode or a highly flexible custom configuration, it can meet the needs of various websites.### The AnQiCMS supported pseudo-static rules mode Pseudo-static rules can rewrite dynamic parameterized URLs into static file URLs, which makes the URLs more readable

2025-11-06

How to correctly display Markdown content, mathematical formulas, and flowcharts in AnQiCMS templates?

As an experienced AnQiCMS website operator, I know that it is crucial to display a diverse range of information efficiently and accurately in the increasingly rich online content ecosystem.Markdown is a lightweight markup language that is widely popular for its simplicity and efficiency.And mathematical formulas and flowcharts are essential expressions for conveying science, technology, or complex logic.This article will detail how to properly configure the AnQiCMS template to perfectly present these advanced contents.

2025-11-06

How to use the `archiveDetail` tag in AnQiCMS template to get document details and custom fields?

As an experienced CMS website operation personnel, I am well aware of the core position of content in website operations.We must not only create high-quality content, but also ensure that this content can be presented to users in a **way.In this, the flexible use of templates is crucial. Today, we will delve into a powerful and commonly used tag in AnQiCMS templates, `archiveDetail`, which helps us easily obtain detailed information about documents, including those carefully designed custom fields.###

2025-11-06