As an experienced website operator proficient in the Anqi CMS content management system, I fully understand the importance of efficient and user-friendly website navigation for visitor experience and information dissemination.In Anqi CMS, adding a single-page link to the website navigation is a common and basic operation, which can help you clearly present independent content pages such as 'About Us', 'Contact Us', 'Privacy Policy' to the users.Next, I will elaborate on the entire process of adding a single-page link in the website navigation.


Add a single page link in website navigation

The website navigation is the key path for users to explore the website content, a clear and intuitive navigation system can greatly enhance the user experience.In Anqi CMS, you can easily integrate the created single-page content into the main navigation of the website or other custom navigation.

Firstly, add a single-page link to the navigation in AnQi CMS, the core steps include creating the single-page content, then adding this link item to the navigation settings, and finally ensuring that the template correctly calls the navigation data.

Step 1: Create or edit a single page content

Before adding a single-page link to the navigation, you need to make sure that the single-page itself already exists and has been published.Please log in to the Anqi CMS backend management interface, find the "Page Resources" module in the left navigation bar, and then click "Page Management" to enter the single page list.

On this page, you can select "Add Single Page" to create a new independent page, such as "About Us" or "Terms of Service."}When creating or editing a single page, you need to fill in the basic page information: the page name will be displayed as the title of the page, and the system will automatically generate a "custom URL" based on this name (you can also manually modify it to meet SEO requirements).The single-page introduction and the single-page content are the core information of the page, please write and arrange them according to your actual needs.If you need to specify an independent display template for the page, you can set it in the 'Single Page Template' field.After filling in all the content, be sure to click Save to publish or update your single page.

Step 2: Access the website navigation settings

After the single-page content is ready, the next step is to add it to the website navigation.Return to the Anqi CMS backend main interface, find the "Backend Settings" module in the left menu, and click on the "Navigation Settings".

On the 'Navigation Settings' page, you will see a 'Navigation Category Management' area.By default, the system provides a "default navigation" category, which is typically used for your website's main navigation.If you need to set independent navigation for the footer, sidebar, or other areas, you can create a new navigation category in this area, such as "Footer Navigation".Select the target navigation category you want to add a single-page link to, for example, click the edit button next to the "default navigation" category to enter the navigation link management interface.

Step 3: Add a new navigation link

In the selected navigation category management page, you will see the list of all links included in the current navigation.To add a new single-page link, please click the 'Add Navigation Link' button on the page.

In the pop-up form 'Add Navigation Link', you need to configure the parameters of the new link.In the 'Link Type' drop-down menu, please make sure to select the 'Category Page Link' option.Select this type after which the system will display a selectable page and category list.From this list, find and select the single page you created or edited in the first step.

Next, fill in the display name for this navigation link, which is the text the user sees in the website navigation.If your design requires, you can also fill in the "subheading name" and "navigation description" to provide more information.To control the display order of links in navigation, please set the "Display Order" field, the smaller the number, the closer the link position.If this single-page link is a submenu of a main navigation item, you also need to select its main navigation item under 'Parent Navigation'.After completing all the configurations, click save, and your single-page link will be successfully added to the navigation data.

Step 4: Call navigation data in the template

Although you have already configured the navigation link in the background, it will not be displayed on the website front end immediately.You need to ensure that the website template uses the navigation list tags provided by Anqi CMS to call these data.Use AnQi CMSnavListTag to get navigation data and render.

Generally speaking, your website template (such as) will contain similar code snippets for displaying navigation:bash.htmlorheader.html) will include similar code snippets like the following for displaying navigation:

{% navList navs %}
<ul>
    {%- for item in navs %}
        <li>
            <a href="{{ item.Link }}">{{item.Title}}</a>
            {%- if item.NavList %}
            <dl>
                {%- for inner in item.NavList %}
                    <dd>
                        <a href="{{ inner.Link }}">{{inner.Title}}</a>
                    </dd>
                {% endfor %}
            </dl>
            {% endif %}
        </li>
    {% endfor %}
</ul>
{% endnavList %}

This code will traverse all the navigation links set in the background and will use their hierarchical relationships (viaitem.NavListDetermine if there is a child navigation) Generate an HTML list structure. If you add a single-page link as top-level navigation, it will be displayed directly.<ul>Below; if it is a sub-navigation, it will be displayed in the corresponding submenu. Please ensure that according to the specific structure of your website template.navListThe label is correctly placed in the position where navigation needs to be displayed. If your template supports multiple navigation categories, you may need to specify which category of navigation data to call via parameters, for exampletypeIdparameters to specify which navigation category data to call, for example{% navList navs with typeId=1 %}.


By following these four detailed steps, you can successfully add a single page link to the website navigation in Anqi CMS.This can not only help you better organize website content, but also provide clear navigation guidance for visitors, thus improving the overall website usability and user satisfaction.


Frequently Asked Questions (FAQ)

Ask: I have added a single-page link to the navigation in the background, but why is it not displayed on the website front-end?

Answer: This situation usually has several reasons. First, please check if you have clicked the 'Update Cache' button in the background. Anqie CMS caches some data to improve performance, and updating the cache ensures that the latest navigation configuration is loaded.Secondly, please confirm that your website template is using correctlynavListtag to call the navigation data, and whether the correct one has been specified.typeId(If your website uses multiple navigation categories). Finally, if the link is set as a sub-navigation, please check that the parent navigation is visible and configured correctly.

Ask: Can I add multiple single-page links as a dropdown menu under a navigation item?

Answer: Yes, Anqi CMS supports multi-level navigation. When adding or editing navigation links, you can use the 'Parent Navigation' field to achieve this function.Just specify the single page link you want as a submenu to an existing top-level navigation item as its 'parent navigation', and the system will display it as an item in the dropdown menu during front-end template rendering.Make sure your template supports rendering multi-level navigation structures.

Ask: Besides single-page links, what types of links can I add to the navigation?

Answer: The navigation settings of AnQi CMS are very flexible, in addition to single page links (selected through the "Category Page Link" type), you can also add the following types of links:

  1. Built-in linkIncluding the home page of the website, the home pages of specific content models (such as article model home page, product model home page).
  2. Category page link:In addition to the single page, you can also choose the created category page as a navigation link.
  3. External linkYou can flexibly fill in any external website or a specific URL path within your website to meet a wider range of link needs.