How to modify the default top navigation of Anqi CMS without changing the template code?

Calendar 👁️ 47

As a website operator who deeply understands the operation of AnQiCMS, I know the importance of flexibly managing website content without touching the template code, especially core elements like the top navigation.AnQiCMS was designed with this in mind, providing an intuitive and powerful back-end management interface that allows you to easily customize and adjust the top navigation of the website without writing a single line of code.

AnQiCMS separates the navigation data of the website from the display logic of the front-end template. This means that the template files (usually usingnavListSuch a label is only responsible for 'asking' what navigation items the system has and how to display them, while the specific content, links, sorting information, and other navigation items are all managed by the backend.This design greatly improves the flexibility of website operation, making content adjustment simple and quick.

Access and configure the website navigation

To modify the default top navigation of AnQiCMS, you first need to log in to the website's backend management interface.In the left menu bar, find and click the "Background Settings" option.In the expanded submenu, you will see an entry named 'Navigation Settings', click on it to enter the navigation management page.This is the center where you manage all website navigation.

Navigation Category Management

On the "Navigation Settings" page, you will see a "Navigation Category Management" section.AnQiCMS provides a category named 'Default Navigation' by default, which is usually the category referred to by your website's top navigation.If you need to create independent navigation for the footer, sidebar, or other locations, you can create more navigation groups by clicking "Add Navigation Category", for example, "Footer Navigation".In this way, you can configure completely independent navigation structures for different areas of the website.

Carefully set navigation links

After entering the "Default Navigation" category, you will see a list of all current navigation links.Here, you can perform operations such as adding, editing, and deleting navigation items.When you click "Add new navigation" or edit an existing navigation link, a configuration form will pop up, which includes multiple key fields that allow you to define each navigation item in detail.

The first is the "parent navigation" field. AnQiCMS supports up to two levels of navigation menus.If your navigation item is the main menu (level 1 navigation), please select 'Top-level navigation';If it is a submenu under a main menu (second-level navigation), then select the corresponding main menu as its parent navigation.

The name to be displayed here, this is the text displayed on the front page navigation link, you can modify it as needed.If you want the navigation item to have a subtitle, for example, to display both Chinese and English at the same time, you can use the "subtitle name" field.In addition, the "navigation description" field allows you to add brief descriptions to navigation items, which may be used on the front end to generate tooltips or as auxiliary information.

The 'Link Type' is the core of defining navigation behavior. AnQiCMS provides three main link types:

  • Built-in links:This type includes predefined links such as 'Home Link' and the 'Article Model Home Page', 'Product Model Home Page' or other custom model home pages that you have created on your website.Select these types to ensure that the link always points to the correct internal system page.
  • Category page links:If you want the navigation link to point to a specific document category or a custom single-page, you can select this type.The system will list all your categories and single pages for you to select, ensuring the accuracy of the links.
  • External links:This type offers you the greatest flexibility, allowing you to manually input any URL, whether it is a specific article within the site, a product detail page, or a link to an external website.This is very useful for guiding users to access specific content or promote partner websites.

Finally, the "Display Order" field allows you to control the arrangement order of navigation items by entering numbers. The smaller the number, the earlier the navigation item is displayed in the list.

The principle of not changing the template code

AnQiCMS template, for example, the default theme includesheader.html(usually contains the top navigation), it will use{% navList navs %}This tag dynamically fetches navigation data from the background. ThisnavListTags usually have atypeIdparameter that specifies which category of navigation data to pull, for example{% navList navs with typeId=1 %}Indicates obtaining the default navigation category with ID 1.

When you make any changes to the links under the "Default Navigation" category in the "Navigation Settings" backend - whether adding, deleting, editing text, changing link type, or adjusting the display order - these changes will be saved to the database. In the frontend template,navListThe tag will query these latest data in real time when the page is loaded. Therefore, as long as your template file uses the correctnavListtag and specifies the correcttypeId(通常是默认导航),All navigation modifications you make in the background will be immediately reflected on the front page of the website, without the need to manually modify any line of template code.

This design, which separates content from presentation, not only lowers the threshold for website operations, but also greatly improves the maintainability and update efficiency of the website.As an operations person, you just need to focus on content organization and user experience optimization, without worrying about complex code issues.

Frequently Asked Questions

Q1: I modified the navigation settings, but the front page did not display the update immediately, why is that?A1: AnQiCMS may have a caching mechanism to improve performance.If your changes do not take effect immediately, please try to find the 'Update Cache' button at the top right or bottom of the background management interface and click to clear the cache.In addition, browser cache may also cause display delay, you can try to refresh the page forcibly (Ctrl+F5 or Shift+F5) or clear the browser cache.

Q2: I want to place a set of independent navigation menus at the footer of the website, how should I operate?A2: You can navigate to the 'Navigation Settings' page and click on the 'Navigation Category Management' feature to add a new navigation category, such as creating a new category named 'Footer Navigation'.Then, add the navigation links you want to display in the footer under this new category.After that, find the corresponding footer file in your theme template (for examplefooter.html),and use{% navList footerNavs with type="页脚导航" %}(Assuming your new category ID or name is "Footer Navigation") such a label to call this new navigation category data.This usually requires you to have a basic understanding of the template structure, but it still belongs to configuration rather than code modification.

Q3: Can I directly add a link in the navigation to a specific product detail page or article detail page?A3: OK. When adding or editing navigation links, you can select the "External Link" type, and then directly paste the complete URL of the product or article detail page into the link address field.AnQiCMS will treat this external link as a normal navigation item.If your website's static rule changes, causing these links to fail, you just need to update the corresponding URL in the navigation settings.

Related articles

Is the navigation setting of Anqi CMS associated with user group permissions?

As an experienced CMS website operation staff member, I know the importance of content strategy and user experience.The navigation system is the first window for users to interact with a website, and its flexibility and security are crucial.This question regarding whether the navigation settings of AnQi CMS are related to user group permissions can be thoroughly discussed based on the provided system documentation.The Anqi CMS is committed to providing users with an efficient, customizable, and easy-to-expand content management solution.

2025-11-06

How to use the Anqi CMS navigation feature to implement the 'breadcrumb navigation' of the website?

In the daily operation of AnQiCMS, a well-designed, user-friendly website navigation system is the key to improving user experience and search engine optimization (SEO).Among them, 'Breadcrumbs navigation' as a kind of auxiliary navigation method, can clearly show the user's current position on the website and provide a convenient path to return to the previous level page.As a senior AnQi CMS operation personnel, I will elaborate in detail on how to fully utilize the built-in functions of AnQiCMS to easily implement the breadcrumb navigation of the website.

2025-11-06

Does the Anqi CMS navigation configuration support linking to external CDN resources?

As an experienced CMS website operation person of an enterprise, I fully understand your attention to the details of the system functions, especially in the context of the increasingly important website performance optimization and resource management in today's era.Regarding the question of whether AnQi CMS navigation configuration supports linking to external CDN resources, I will elaborate on it in detail.One of the design philosophies of Anqi CMS is to provide an efficient, customizable, and easily expandable content management solution, which naturally also includes flexible support for external resource links.

2025-11-06

How to ensure that the navigation settings of AnQi CMS display consistently on mobile and PC endpoints?

Ensure the consistency of the CMS navigation display effect between mobile and PC terminalsAnQiCMS provides a flexible template system and content management mechanism, which can fully realize the consistency of navigation display effects on mobile and PC terminals through reasonable configuration and application of front-end technology.

2025-11-06

After creating a new navigation category in AnQi CMS, do you need to refresh the cache for it to take effect?

As an experienced CMS website operation personnel of an enterprise, I know the important impact of the cache mechanism in the content management system on website performance and data real-time.When discussing whether cache needs to be refreshed after creating a new navigation category in Anqi CMS, this not only concerns technical details, but also directly affects the timeliness of website content updates and user experience.The Anqi CMS is designed to provide an efficient and easy-to-use content management solution, and its built-in caching mechanism is a key factor in improving website loading speed and handling high concurrency traffic.

2025-11-06

How to implement a link pointing to the 'Product Model Home Page' in AnQi CMS navigation?

As a content expert who deeply understands the operation of AnQiCMS, I fully comprehend the importance of reasonable layout of important links in website navigation.A clear and intuitive navigation not only enhances user experience but is also the key to guiding users to discover core content and achieve business goals.Below, I will give you a detailed introduction on how to implement a link to the 'Product Model Home Page' in the Anqi CMS navigation.

2025-11-06

How to get the category ID corresponding to the link in the `navList` loop for `item.PageId`?

In AnQiCMS, efficiently managing and displaying website navigation is one of the core tasks of website operation.We often need to dynamically load corresponding content based on the navigation menu items, such as displaying a list of articles under a specific category, or jumping to a specific category page.This involves how to accurately obtain the corresponding category ID for each navigation link in the `navList` loop.As an experienced AnQiCMS operations staff, I will elaborate on the application of `item.PageId` in this scenario.

2025-11-06

What will happen to the navigation if the target page of the AnQiCMS navigation link is deleted?

As a senior security CMS website operator, I know the importance of content management systems in website operation, especially navigation links, which directly affect user experience and website architecture.For the question you raised, 'If the target page of the Anqi CMS navigation link is deleted, how will the navigation display?'This question, I will elaborate in detail on the functional features of AnQi CMS.The AnQi CMS navigation system aims to provide flexible and configurable link management features.

2025-11-06