In the Anqi CMS navigation settings, will the sub-navigation automatically hide if it has no content?

Calendar 👁️ 50

In the daily operation of AnQiCMS, navigation settings are a key component of website structure and user experience.Many operators are concerned with a practical issue: Will the sub-navigation automatically hide if there is no content?As an operator familiar with the operation mechanism of AnQiCMS, I can deeply answer this question.

The AnQi CMS navigation management system provides a flexible mechanism that allows us to define the menu structure of the website, including the main navigation, sub-navigation, and other levels.In the background "Website Navigation Settings", we can add navigation links for different navigation categories, and set their hierarchical relationships, for example, setting a link as the "parent navigation" of another link, thereby forming a sub-navigation.These navigation links can point to built-in pages, category pages, or any external links, which gives us a high degree of freedom in website structure design.

However, it should be clearly stated that the core system of Anqi CMS does not automatically judge whether the sub-navigation has actual content and hide the navigation items accordingly.When we configure a sub-navigation in the background, we are specifying a target link (such as a category page) for it, and giving it a display name.The CMS itself does not track in real-time whether the content entity associated with the target link (such as the articles under the category) exists or is empty.Therefore, even if there are no articles in a category, the sub-navigation links pointing to that category will still be enabled in the background, and if the front-end template does not make special handling, it will still be displayed on the website's front page.

Does the sub-navigation automatically hide, and the decision mainly falls on the front-end template design? The template tags of Anqi CMS, such asnavListAllow developers to traverse and render the navigation structure programmatically.In the practice of template development, in order to ensure the simplicity and logical accuracy of the user interface, template designers will use conditional judgment statements to check whether the sub-navigation indeed contains valid sub-items. For example,navListLabels are provided for each item in the returned navigation listNavListproperty if the navigation item has child navigationNavListIt will be an array containing sub-navigation data; if there is no sub-navigation, it will be empty.

Experienced template designers will take advantage of this feature to add similar when rendering navigation.{%- if item.NavList %}such a judgment. Only whenitem.NavListthis array is not empty (i.e., there are child navigation items)<ul>or<div>Wait for the HTML structure. This way, even if the background is configured with an empty sub-navigation (i.e., all its sub-links have been deleted or it points to a category without content), due toNavListIt is empty, the front-end template will not generate any visible HTML elements for it, thus achieving the effect of 'auto-hiding'.This design concept separates content from display logic, giving the template greater flexibility and control.

Therefore, as a website operator, when we find that there are sub-navigations without content on the website, the focus we should pay attention to is not whether the Anqi CMS system automatically hides it, but to check whether the current website's front-end template has properly handled this situation.A high-quality template will anticipate and handle these details, ensuring that the website navigation remains professional and practical through clever template logic, avoiding empty navigation items to provide an excellent user experience.

Frequently Asked Questions (FAQ)

1. How can I ensure that empty sub-navigation does not display on the front end in Anqi CMS?

The AnQi CMS system itself does not automatically hide empty sub-navigation.You need to ensure that the front-end template used on your website includes appropriate conditional logic to handle this situation.Generally, templates will use{% if item.NavList %}This tag is used to check if the parent navigation item has an actual sub-navigation list, and the corresponding HTML structure will only be rendered when a sub-list exists.If you find that the empty sub-navigation still displays, you may need to contact the template developer for adjustment, or check the corresponding code of your own template.

2. Will Anqi CMS automatically remove navigation links pointing to empty categories or pages?

I won't. The navigation settings of Anqi CMS are configured independently of whether the actual content exists or not.Even if a navigation link points to a category or a single page that currently has no content, the navigation link itself will still exist in the background, and if the front-end template does not perform special judgment and processing, it will continue to be displayed on the front page.The system will not automatically delete or hide these links.

What will happen if my navigation link points to a non-existent page?

If the navigation link points to a page that does not actually exist on the website (for example, the page has been deleted, or the link address is incorrect), the user will usually see the website's 404 error page when they click on the link.The AnQi CMS does not automatically identify and remove navigation links pointing to invalid pages; this requires the operations personnel to regularly check and maintain the validity of the navigation links.

Related articles

How does Anqi CMS handle a navigation link that is both an internal link and a category link?

In the operation practice of AnQi CMS website, the setting of navigation links is a key link in user experience and search engine optimization.When discussing a navigation link that is both an embedded link and a category link, this actually touches on the core principles of the Anqi CMS navigation system design: clear, single configuration logic.The design philosophy of Anqi CMS is to ensure that each navigation item's function and direction are clear and accurate.

2025-11-06

How to add SEO-friendly description information to navigation links in the Anqi CMS backend?

Add SEO-friendly description information for navigation links in AnQi CMS backend In website operations, navigation is not only the path for users to explore website content, but also an important clue for search engines to understand the structure and content themes of the website.A clear, meaningful, and SEO-friendly navigation system that can significantly improve user experience and website performance in search engines.AnQi CMS understands this and provides an intuitive function, allowing operators to easily add SEO value description information to navigation links.

2025-11-06

Does the 'Display Order' field in the Anqi CMS navigation settings support negative numbers?

As an experienced CMS website operation person in an enterprise security company, I am well aware that every detail in content publishing and management is crucial to the user experience and operational efficiency of the website.Regarding the question you raised about whether the 'display order' field supports negative numbers, we can look for clues in the official documents of AnQi CMS and analyze it in combination with actual operational experience.### Does the 'Display Order' field in the Anqi CMS navigation settings support negative numbers?In AnQi CMS, 'Display Order' is a key sorting control field that applies to multiple content types, including website navigation

2025-11-06

What is the specific restriction mentioned in `help-setting-nav.md` regarding the maximum of 2-level navigation links?

As a professional who deeply understands the operation of Anqi CMS, I am well aware of the importance of a clear navigation structure for user experience and the overall efficiency of the website.About the limit of "up to 2-level navigation links" mentioned in the `help-setting-nav.md` document, this is indeed a core consideration in the design of the navigation function in Anqi CMS, aiming to balance the practicality and simplicity of the system.### The "Most 2 Levels" Limitation Parsing of AnQi CMS Navigation In the navigation settings of AnQi CMS

2025-11-06

How does the 'common usage examples' of `tag-navList.md` guide the design of complex navigation structures?

As an expert in the operation of AnQiCMS, I know that a highly efficient, intuitive, and flexible navigation system is crucial for the success of a website.It is not only a map for users to explore the content of the website, but also a key for search engines to crawl and understand the structure of the website.AnQiCMS through its powerful template tag system, especially the navigation list tag described in `tag-navList.md`, provides a solid foundation and clear guidance for us to design and implement complex and diverse navigation structures.

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

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 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