How to customize Anqi CMS navigation categories, and achieve footer or sidebar navigation?

Calendar 👁️ 64

As an operator who deeply understands the operation of AnQiCMS, I know the importance of a flexible and user-friendly navigation system for improving the discoverability and user experience of the website.The AnQi CMS provides powerful and intuitive navigation customization features, making it easy to deploy special navigation in the footer, sidebar, or any other area.

The following will elaborate on how to customize navigation categories in AnQi CMS to achieve footer or sidebar navigation.

Understanding the navigation system of AnQi CMS

In Anqi CMS, the core of navigation lies in the concepts of 'navigation category' and 'navigation link'.The system will provide you with a "default navigation" category, which is usually used for the main menu of a website.However, to meet the specific navigation needs of different areas (such as website footers, sidebars, or a specific topic page), AnQi CMS allows you to create an unlimited number of custom navigation categories.Under each category, you can freely add, manage, and sort a series of navigation links to build a clear and guiding website structure.This design greatly improves the organization and display flexibility of the website content.

Create custom navigation categories

To implement footer or sidebar navigation, you first need to create a separate navigation category for these areas.

You need to log in to the Anqi CMS admin interface, then find and click on the "Admin Settings" in the left menu, and then select the "Navigation Settings" option.On the navigation settings page, you will see a 'Navigation Category Management' area.Here, the system will list existing navigation categories. To add, please click the 'Add Navigation Category' button.

At this time, the system will pop up a form, asking you to fill in the name of the new navigation category.For example, if you plan to create a footer navigation, you can name it 'Footer Navigation';If it is a sidebar navigation, it should be named 'sidebar navigation'.Clear naming helps you manage and identify in the future. After submitting the form, a new navigation category is created successfully and a unique internal ID is assigned.This ID will be used when custom navigation is integrated into the website template later.

Configure navigation links

After creating a custom navigation category, the next step is to add specific navigation links to it.

On the "Navigation Settings" page, select the custom navigation category you just created (for example, "Footer Navigation"), and then click the "Add Navigation Link" button. This will open a form to configure the navigation link, where you can fill in the following fields as needed:

  • Parent navigation: This field is used to build multi-level navigation. If you want the current link to be a top-level navigation item, please select "Top-level navigation";If you want to create a secondary navigation, select the corresponding primary navigation item as the parent.The AnQi CMS currently supports up to two levels of dropdown navigation.
  • display nameThis is the text displayed for the navigation link on the front page.You can set it flexibly as needed, it does not have to be consistent with the link content.For example, a navigation item linking to the "Contact Us" page, the display name can be set to "Contact Us."}
  • Subheading name: If your design requires navigation items to display dual titles, such as Chinese main titles and English subheadings, you can enter the subheading content in this field.
  • Navigation descriptionThis field allows you to provide a brief description for navigation items, which can be called to display on the front-end template, providing more context information to users.
  • Link Type: SecureCMS offers three flexible link types to meet the needs of different content:
    • Built-in link: Includes a 'home link' and the home pages of custom models on your website (such as 'article model home page', 'product model home page'). This applies to links pointing to the core functions of the website.
    • Category page link: Allow you to select an existing document category or single page as a navigation link. This makes it very convenient to integrate a specific content collection or independent page into the navigation.
    • External link: Provide the greatest flexibility, you can enter any internal or external URL.Whether it is a link to a specific article within the site or a link to an external partner website, it can be added in this way.
  • Display order: By setting the number to control the arrangement of navigation links. The smaller the number, the closer the link is displayed in the list. Currently, sorting is achieved by numerical value, and drag-and-drop is not supported.

After completing all field entries and saving, your navigation link has been successfully added to the custom category. You can repeat this process to add all the required navigation items.

Integrate custom navigation in the template

After configuring the navigation categories and links in the background, the next critical step is to display these navigation data on the website's frontend page. This is mainly achieved through the template tags of Anqi CMSnavListto achieve.

Firstly, you need to determine which template file your navigation will be deployed in. For footer navigation, it is usually integrated intobash.htmlThe footer part of the template storing common page header, footer elements. For sidebar navigation, it may be placed inpartial/a code snippet file under the directory, such aspartial/sidebar.html), and then throughincludeLabel it to include it in the page template that needs to display the sidebar.

In the template file, you can usenavListthe tag to call your custom navigation category.navListthe tag needs atypeIdThe parameter is used to specify the navigation category to be called. ThistypeIdIt is the internal ID assigned by the system when you create a custom navigation category. You can view it by the URL in the browser address bar when editing navigation categories in the backgroundidParameters, or obtained through other backend entries.

The following is an example of calling custom navigation and performing a loop output.

{# 假设您的页脚导航类别ID为 2 #}
{% navList footerNavs with typeId=2 %}
{% if footerNavs %}
<div class="footer-navigation">
    <ul>
        {%- for item in footerNavs %}
        <li class="footer-nav-item {% if item.IsCurrent %}active{% endif %}">
            <a href="{{ item.Link }}" {% if item.Nofollow == 1 %} rel="nofollow" {% endif %} {% if item.Target == 1 %} target="_blank" {% endif %}>
                {{item.Title}}
                {%- if item.SubTitle %}<small>{{item.SubTitle}}</small>{% endif %}
            </a>
            {%- if item.NavList %} {# 如果有二级导航 #}
            <dl class="footer-sub-nav">
                {%- for inner in item.NavList %}
                <dd class="footer-sub-nav-item {% if inner.IsCurrent %}active{% endif %}">
                    <a href="{{ inner.Link }}" {% if inner.Nofollow == 1 %} rel="nofollow" {% endif %} {% if inner.Target == 1 %} target="_blank" {% endif %}>
                        {{inner.Title}}
                    </a>
                </dd>
                {% endfor %}
            </dl>
            {% endif %}
        </li>
        {% endfor %}
    </ul>
</div>
{% endif %}
{% endnavList %}

{# 假设您的侧边栏导航类别ID为 3 #}
{% navList sidebarNavs with typeId=3 %}
{% if sidebarNavs %}
<aside class="sidebar-block">
    <h3>侧边栏导航</h3>
    <ul class="sidebar-menu">
        {%- for item in sidebarNavs %}
        <li class="sidebar-menu-item {% if item.IsCurrent %}active{% endif %}">
            <a href="{{ item.Link }}">
                {{item.Title}}
                {%- if item.Description %}<span>{{item.Description}}</span>{% endif %}
            </a>
            {%- if item.NavList %} {# 侧边栏的二级导航 #}
            <ul class="sidebar-submenu">
                {%- for inner in item.NavList %}
                <li class="sidebar-submenu-item {% if inner.IsCurrent %}active{% endif %}">
                    <a href="{{ inner.Link }}">{{inner.Title}}</a>
                </li>
                {% endfor %}
            </ul>
            {% endif %}
        </li>
        {% endfor %}
    </ul>
</aside>
{% endif %}
{% endnavList %}

Please note,item.Nofollowanditem.TargetIn the document.navListofitemBut not explicitly listed in the available fields.help-setting-nav.mdMentioned that the external link can flexibly add various web links, andtag-linkList.mdmentionedNofollowField, so these properties may exist in the actual navigation links, you can try using them. If they do not exist, please delete the relevant judgments to avoid template errors.

Through the above code, Anqi CMS will dynamically generate the corresponding navigation structure based on your backend configuration.You can design your own template to add CSS styles to beautify these navigation, making them consistent with the overall style of the website.

Optimize and maintain

Successful navigation not only lies in its functional implementation, but also in its positive impact on user experience and SEO.

  • SEO considerations: Ensure your navigation link structure is clear, URL semantic, and avoid dead links.The pseudo-static feature of Anqi CMS (configured under 'Feature Management' and 'Pseudo-static Rules') helps generate more search engine-friendly URLs.For links pointing to external sites or links that should not pass weight, consider marking them when setting up background navigation links.nofollow.
  • Responsive Design: With the growth of mobile device users, it is essential to ensure that your footer and sidebar navigation display and interact well on different screen sizes.This requires you to apply the appropriate responsive CSS in the template.
  • Regular updates: The website content and strategy are not fixed, your navigation should also be adjusted accordingly.Regularly check the validity of navigation links and adjust the display order of navigation items, add or delete links based on website content updates, hot topics, or user behavior analysis to maintain relevance and guidance.

By following these detailed steps and considerations, you will be able to fully utilize the navigation customization capabilities of Anqi CMS to create a multi-area navigation that is both beautiful and practical for your website, thereby effectively enhancing user satisfaction and the website

Related articles

How can AnQi CMS create multi-level navigation menus, and does it support dropdown sub-menus?

As an experienced AnQiCMS website operations personnel, I know the importance of a clear and efficient navigation system for user experience and search engine optimization (SEO).High-quality navigation not only helps users quickly find the information they need, but also guides search engine spiders to effectively crawl website content, improving the overall performance of the website.The AnQi CMS provides an intuitive and flexible solution for creating and managing navigation menus, perfectly supporting multi-level menu structures.###

2025-11-06

How to set the TDK (title, keywords, description) on the Anqi CMS homepage, and what is its importance for website optimization?

As an experienced AnQiCMS (AnQiCMS) website operator, I am well aware of every detail of a website, especially the setting of the home page TDK (title, keywords, description), which plays a key role in making the website stand out in the fierce competition.With the powerful support of AnQiCMS, we can efficiently and accurately manage these important SEO elements, thereby bringing significant optimization effects to the website.### Understanding the meaning of TDK on the website homepage Before delving into its importance, we must first clarify what each TDK represents

2025-11-06

How to customize the contact information field in Anqi CMS and display it in the template?

As a website operator who is well-versed in the operation of AnQiCMS, I understand that the core of content management lies in the combination of flexibility and user experience.Contact information is an indispensable part of a website, its ability to customize the display directly relates to the shaping of the corporate image and the convenience of communication with users.AnQi CMS provides very friendly support in this regard.How to customize the contact information field in AnQi CMS and display it in templates In modern website operations, a clear and convenient contact method is crucial for gaining user trust and promoting business conversion.

2025-11-06

How to set up and apply the default thumbnail feature of AnQi CMS, and what impact does it have on documents without thumbnails?

As an experienced CMS website operation person, I know the importance of content in attracting and retaining users, and visual content, especially thumbnails, play an indispensable role in capturing readers' attention in the first place.In AnQiCMS, thumbnails are not only a guarantee of the beauty of content display, but also a key to improving user experience and the efficiency of content dissemination.Below, I will elaborate on the settings, application, and its impact on the document content of the Anqi CMS default thumbnail function.Configure the default thumbnail function of Anqi CMS In the Anqi CMS admin interface

2025-11-06

What are the uses of the 'Built-in Link', 'Category Page Link', and 'External Link' in the AnQi CMS navigation link?

In the daily operation of Anqi CMS, navigation links are the first hurdle for users to interact with website content, and they are also crucial for search engines to understand the website structure.As an experienced website operator proficient in content creation, editing, publishing, and optimization, I know that the setting of each navigation element affects user experience and SEO performance.The Anqi CMS provides three main types of navigation link types: built-in links, category page links, and external links, each playing a different role, together building an efficient website navigation system.

2025-11-06

Which modes of static rules does AnQi CMS have, and which one is most friendly to SEO?

As a website operator who has been deeply involved with AnQiCMS for many years, I know the importance of URL structure for website operations, especially for Search Engine Optimization (SEO).A clear and meaningful URL not only enhances user experience but also helps search engines better understand and crawl website content, thereby affecting the ranking performance of the website.The AnQi CMS is well-versed in this, providing various static rules to meet the needs of different websites.The pseudo-static rules of AnQi CMS, the core is to convert dynamic URLs (such as `/')

2025-11-06

How to customize the pseudo-static URL structure in Anqi CMS, what variables can be used?

As an experienced website operator who is well-versed in AnQiCMS, I know that a friendly and logical URL structure is crucial for the website's SEO and user experience.AnQiCMS provides strong flexibility in customizing static URL structures, allowing us to design the most suitable link format for the website according to specific needs. ## AnQiCMS URL structure customization guide for pseudo-static Pseudo-static URL, as the name implies, is a technique that makes dynamic pages look like static pages.

2025-11-06

What problems can be caused by incorrect configuration of pseudo-static rules, and how to investigate and avoid them?

As an experienced enterprise CMS website operation staff member, I am well aware of the importance of website URL structure for user experience and search engine optimization.AnQi CMS provides a powerful and flexible static rule configuration function, especially its 'custom mode', which provides great freedom for the URL display form of our website content.However, this flexibility also comes with potential risks. If the custom static rule configuration is not set properly, it may affect the access to some pages, or even cause the entire website to crash, bringing unnecessary trouble to the website operation.###

2025-11-06