AnQiCMS Navigation Menu: Flexible management, precise guidance for users to navigate your website

In the wave of digitalization, websites are not only carriers of information, but also the portal of corporate image and user experience.And the navigation menu of the website is undoubtedly the most critical guidance system of this portal.A well-designed and efficient navigation menu that not only helps users quickly find the information they need, improve browsing efficiency, but also optimize the website structure and help search engines better understand and crawl your website content.As an experienced website operations expert, I know what a powerful and easy-to-use navigation management function means to an operator.Today, let's delve deeply into how AnQiCMS empowers you to easily manage and set up the navigation menu of your website.

AnQiCMS, this is an enterprise-level content management system built on the Go language foundation, which has fully considered the actual needs of content operation from the very beginning. Its navigation management function is one of its highlights.It provides a直观而灵活的机制,allowing you to adjust the structure and direction of the website in response to changes in business scenarios.

Admin Management: The 'command center' controlling the navigation

To manage the website's navigation menu, we will naturally come to the AnQiCMS backend first. In the system's left navigation bar, you can find the prominent “Backend settingsOption, click to enter and you will seeNavigation settingsThis is the core function module. Here, it is the command center where you can fully control the website navigation.

AnQiCMS has巧妙ly differentiated the management of the navigation menu, you can not only set the main navigation, but also create various types ofnavigation categoryThis means you can create independent navigation menu sets for the top navigation of the website, footer navigation, sidebar navigation, or even specific marketing activity pages.For example, you can set a "default navigation" category for regular website content, and create a "footer navigation" category for company information and privacy policies.This category management greatly enhances flexibility, allowing you to provide customized navigation experiences tailored to different display areas and user needs.

After determining the navigation category, the next step is to fill in the specific “Navigation link”for each category. AnQiCMS provides a variety of link types to meet the complex structure of various websites:

  • Built-in linkThis is the most convenient option, the system will automatically identify and provide some commonly used links, such as the homepage of the website, the homepage of the article model, the homepage of the product model, etc., and you just need to select with one click.
  • Category page link: If you want to set a specific content category or standalone page as a navigation item, you can directly select it from the existing categories or single pages.This ensures that navigation is closely associated with the actual content of your website.
  • External linkOf course, website operations often require linking to external resources or custom internal URLs.Through an external link, you can flexibly enter any URL address, whether it is a partner website or a specific marketing landing page.

In addition, each navigation link has fine-grained configuration options.display nameIs the text directly visible to users on the frontend interface, and you can optimize it according to the brand style or SEO strategy. If you need a richer display, you can also addSubheading nameandNavigation descriptionAdditional information is provided for navigation items. AnQiCMS also supports creating up toTwo-levelnavigation menus by setting “Parent navigationYou can easily build a complex navigation structure with drop-down menu effects. Finally, by adjustingDisplay orderYou can control the arrangement of navigation items in the menu to ensure that the most important content is presented first.Although currently drag-and-drop sorting is not supported, precise control can still be achieved through numerical adjustment.

Template integration: Make navigation elegant on the front-end

The backend settings are the construction of the data, while the front-end template is the stage where these data are presented beautifully.AnQiCMS uses the Django template engine's tag syntax, making the display of navigation menus intuitive and expressive.

The core template tags arenavListIt is responsible for extracting the meticulously configured navigation data from the background. In your website template file (for exampleheader.htmlorfooter.htmlIn it, you can usenavListtags to call these data.

For example, a basic navigation list can be constructed 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 %}

In this code block,{% navList navs %}The tag will get all the navigation data under the specified navigation category and assign it tonavsthis variable. Then, through{% for item in navs %}Loop, you can iterate over each navigation item's properties, such asitem.Title(Navigation title),item.Link(link address), as well asitem.IsCurrent(Check if the current page is the navigation item). Furthermore,{% if item.NavList %}The judgment can elegantly handle the display of secondary navigation, through nestedforLoop, you can also render the submenu items. This clear structure allows front-end developers to flexibly build various styles of navigation menus according to the design.

In addition to the main navigation, AnQiCMS also providesbreadcrumbTags are used to generate breadcrumb navigation. Breadcrumb navigation can provide clear path guidance when users delve into the website hierarchy, effectively enhancing user experience. You just need to call it in the template.{% breadcrumb crumbs %}The system will automatically generate a traceable navigation path based on the current page location.

Summary: Efficiency and experience in harmony.

The navigation management function of AnQiCMS, from the data configuration of the backend to the template rendering of the frontend, reflects its efficient and flexible design concept.It not only allows website operators to easily handle daily content updates and structural adjustments, but also ensures that website navigation can accurately serve users through refined control, while also providing friendly website structure signals to search engines.No matter the size of your website, AnQiCMS can provide a stable and scalable navigation solution to help your website stand out in the intense market competition.


Frequently Asked Questions (FAQ)

Q1: AnQiCMS' navigation menu supports up to how many levels?AnQiCMS' navigation menu currently supports nativelyTwo-levelThe structure, that is, the main navigation item and its sub-navigation items at the next level. This is sufficient to meet the needs of the vast majority of corporate websites and content-based websites, effectively maintaining the simplicity and usability of navigation.

Q2: How do I adjust the order of navigation links? Does it support drag and drop sorting?You can adjust the "navigation link settings" in the background to change each link's "Display orderThe number controls the arrangement. The smaller the number, the earlier the navigation item is in the menu.The current version does not support intuitive drag-and-drop sorting functionality, but precise sorting control can still be achieved through numerical adjustment.

Q3: Can I display different navigation menus in different areas of the website?Of course. AnQiCMS provides “Navigation Category ManagementFunction. You can create multiple navigation categories, such as "Top Navigation", "Footer Navigation", "Sidebar Navigation", etc., and then add independent navigation links for each category.In the front-end template, throughnavListlabel'stypeIdParameter, you can call and display a specific category of navigation menu to achieve personalized navigation display for different regions.