How to create and manage different types of website navigation in AnQiCMS (such as top, footer navigation)?

Calendar 👁️ 54

As an experienced security CMS website operator, I know that clear and intuitive website navigation is crucial for improving user experience and search engine optimization.AnQiCMS offers a powerful and flexible navigation management feature, allowing you to easily create menus for the top, bottom, or sidebar of your website.This article will elaborate on how to create and manage different types of website navigation in AnQiCMS.

Understand the core concept of AnQiCMS navigation

In AnQiCMS, the construction of website navigation is mainly based on two core concepts: Navigation Categories and Navigation Links.The navigation category is used to distinguish different navigation areas on a website, such as "top navigation", "footer navigation", or "sidebar navigation".Each category includes one or more navigation links, which make up the menu items that users actually click, pointing to different pages or external resources on the website.

Create and manage navigation categories

First, you need to enter the AnQiCMS backend management interface, and go to the 'Navigation Settings' page through the 'Backend Settings' menu.Here, you will see the 'Navigation Category Management' section. The system provides a default 'Default Navigation' category by default, but it is recommended to create new navigation categories according to your actual needs.

To add a new navigation category, just click the "Add New Navigation Category" button.For example, if you plan to create a menu at the bottom of the website, you can add a new category named "footer navigation".After creating the category, you can independently configure navigation links for the category to ensure that the menu content in different areas of the website does not interfere with each other and is managed in order.

Configure the detailed steps of navigation links

In the "Navigation Settings" page, in the "Navigation Link Settings" section, you can add and edit specific menu items for the navigation categories you have created. Each navigation link provides a rich set of configuration options to meet the diverse navigation needs of websites:

  • Parent navigation:AnQiCMS supports up to two levels of navigation links. If you want to create a main menu item, please select 'Top-level navigation' as its parent.If the link is a secondary menu item, select the parent primary menu from the dropdown list.This makes creating a structured multi-level menu simple and intuitive.
  • Display name:This is the menu text that the user sees on the website front-end. You can freely modify it as needed, without having to match the title of the page linked, to optimize user experience and conciseness.
  • Subtitle name:Some designs may need to display a subtitle or auxiliary text below the main title. By filling in this item, double title navigation styles can be realized in the frontend template.
  • Navigation Description:This is an optional field that can provide a brief description or hint for navigation links, usually used to display tooltips or more detailed introductions when hovering over the mouse.
  • Link Type:AnQiCMS provides three flexible link types:
    • Built-in links:This type allows you to easily link to fixed built-in pages of the website, such as "Home Link" and "Article Model Home" and "Product Model Home", etc., for custom content models' home pages.
    • Category page links:You can directly select any content category or independent single page created on the website as a navigation link. This greatly simplifies the process of integrating website content into navigation.
    • External links:If you need to link to external resources or a custom internal URL, you can select this type and enter the complete URL address.
  • Display order:By entering a number to control the arrangement order of navigation links. The smaller the number, the earlier the link is displayed in the menu.Currently, AnQiCMS uses numerical sorting, and it may support drag-and-drop sorting in the future to provide a more intuitive operation experience.

Call navigation in the website template

After configuring the background navigation, a key step is to correctly call and display these navigations in the website's front-end template. AnQiCMS provides powerfulnavListTemplate tags to achieve this goal.

You usually find in the website's common header (header) or footer template files (for example/template/您的模板目录/partial/header.htmlor/template/您的模板目录/bash.htmlUsed innavListtag. When using it, you need to specifytypeIdParameters to call a specific navigation category.typeIdThe value corresponds to the ID of each category you create in the "Navigation Category Management" section in the backend. If not specified, the default will be called.typeId=1(i.e. "default navigation").

The following is an example of calling two-level navigation in a template:

{% navList navs with typeId=1 %} {# 假设1是您的顶部导航类别ID #}
<ul>
    {%- for item in navs %} {# 循环遍历一级导航项 #}
        <li class="{% if item.IsCurrent %}active{% endif %}">
            <a href="{{ item.Link }}">{{item.Title}}</a>
            {%- if item.NavList %} {# 判断是否存在二级导航 #}
            <dl> {# 二级导航通常用dl/dd或ul/li结构 #}
                {%- 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 will first call all first-level navigation links under the navigation category with ID 1. Then, for each first-level navigation link, it will check if there is a sub-navigation (item.NavListIf there is, then further loop to display the second-level navigation links.By CSS styles, you can render these structures into beautiful dropdown menus, top classification menus, or footer link groups.

AnQiCMS template mechanism also supportsincludeandextendsAuxiliary tags, you can break down the complex navigation structure into smaller reusable template fragments, and then throughincludeLabel it to introduce it to the main template, thus maintaining the cleanliness and maintainability of the template code.

Optimize navigation display and user experience.

High-quality website navigation can not only help users quickly find the information they need, but also effectively guide search engine spiders to crawl website content, improving SEO effectiveness.AnQiCMS' navigation management feature supports multi-template switching, including adaptive, code adaptation, and PC+mobile independent site mode. This means that you can design different layouts and styles for navigation according to different devices and display requirements, ensuring a** user experience on any device.By rational planning and detailed configuration of navigation, you can significantly improve the usability and discoverability of the website.

In summary, AnQiCMS provides a set of intuitive and powerful navigation creation and management tools.From defining different navigation categories, to finely configuring each navigation link's display name, link type, and order, to the flexible template calling mechanism, every step aims to help website operators efficiently build a website navigation system that is both beautiful and practical, thereby enhancing user satisfaction and the overall performance of the website.


Frequently Asked Questions (FAQ)

Does AnQiCMS support creating navigation menus with more than two levels?

The AnQiCMS backend navigation link settings currently support up to two levels of navigation (i.e., one-level main menu and its sub-menus). If you need a deeper navigation structure, you may need to use custom templates and combine other content list tags such ascategoryList) Generate more content links within the secondary menu items, but this will require more complex template logic to achieve the visual effects of three or more levels.

Can I adjust the order of navigation links by dragging?

The display order of navigation links in the current version of AnQiCMS is controlled by numerical values. The smaller the number, the earlier the sorting. You need to

Related articles

What is the effect of the home page keyword and description setting of AnQiCMS on search engine ranking?

As a website operator who deeply understands the operation of AnQiCMS (AnQiCMS) and has a profound understanding of content creation, editing, publishing, and optimization, I am very clear about the importance of keywords and descriptions on the homepage for the performance of the website in search engines.AnQiCMS provides powerful and flexible tools, allowing these key SEO elements to be managed and optimized efficiently.The setting of home page keywords (Keywords) and description (Description) is the foundation of the website's SEO strategy

2025-11-06

How to set the SEO title of the homepage in AnQiCMS and improve search engine visibility?

As an experienced AnQiCMS website operator, I know the importance of the SEO title on the homepage for search engine visibility and the first impression of users.In AnQiCMS, we provide a powerful and flexible TDK (Title, Description, Keywords) setting function, allowing you to finely optimize the homepage of the website to attract more target users.### Understanding the Key Role of SEO Title on the Website Home Page SEO Title of the Website Homepage

2025-11-06

How to set the default thumbnail of AnQiCMS to ensure consistent display of document images?

As an experienced security CMS website operator, I am well aware of the importance of visual consistency of website content for user experience and brand image.Especially in the display of document images, if the thumbnails are of different sizes or missing, it will greatly affect the aesthetics and professionalism of the page.The AnQi CMS provides a comprehensive thumbnail setting function, ensuring that your website content is presented to readers in a unified and professional manner.### The Core of Ensuring Consistency in Document Image Display: Default Thumbnail Settings In daily website operations, we publish a large amount of content

2025-11-06

How to batch regenerate all thumbnails of the AnQiCMS website to adapt to the new size settings?

As a website operator who is deeply familiar with the operation of AnQiCMS, I know that website content management is not just about publishing text and images, but also ensuring that every detail conforms to the visual experience and performance optimization of the website.When the visual strategy of the website is adjusted, for example, when it is necessary to unify the thumbnail size to adapt to the new design style, the batch thumbnail regeneration function provided by AnQiCMS becomes particularly important.This can help us efficiently update the visual presentation of the website without manually handling each one.--- ### Batch regenerate AnQiCMS website thumbnails

2025-11-06

What types of navigation links does AnQiCMS support (built-in, categories, external links)?

As an expert in the operation of AnQiCMS, I am well aware of the importance of an efficient and user-friendly navigation system for the overall performance of a website.The Anqi CMS provides rich and flexible options for navigation link management, ensuring that content can be organized and presented intuitively.We will discuss in detail the types of navigation links supported by AnQiCMS, helping you better plan and optimize the website structure.The navigation function of Anqi CMS is the core of website content presentation, it is not only the guidance of the user's browsing path, but also the intuitive expression of the site information architecture

2025-11-06

How to set up secondary navigation and deeper level navigation structure in AnQiCMS, and call it in the template?

As an experienced CMS website operations personnel for a safety enterprise, I fully understand the extreme importance of a clear and efficient navigation system for website user experience and content organization.In AnQiCMS, establishing a multi-level navigation structure, whether it is the basic two-level navigation or the "deeper level" achieved through clever combination, is a key link in website content management.Here we will elaborate on how to set up and call these navigation in AnQiCMS.

2025-11-06

How to adjust the display order of navigation links in AnQiCMS?

As an experienced website operator who deeply understands the operation of AnQiCMS, I am well aware of the importance of website navigation to user experience.A clear and logical navigation system that can effectively guide visitors to quickly find the information they need, thereby improving the usability and user satisfaction of the website.AnQiCMS as an efficient content management system provides an intuitive way to manage your website navigation, including precise adjustment of the display order of navigation links.

2025-11-06

How does the content model feature of AnQiCMS help me customize the structure of different types of content?

As an experienced CMS website operation person, I am fully aware of the importance of content structure for website operation.A flexible and customizable content model is the foundation for diverse content display and efficient content management.AnQi CMS offers very excellent functions in this aspect, allowing us to finely define and manage various types of content according to specific business needs. ### Secure CMS Content Model: The Foundation of Customized Content Structure In today's ever-changing digital environment, websites are no longer just static information display platforms.

2025-11-06