In what situations would the `PageId` field of the AnQi CMS navigation link be used?

Calendar 👁️ 53

AnQiCMS is a system focused on efficient content management, and its navigation function is an important bridge for users to interact with website content.A well-designed and powerful navigation system that can significantly improve the usability and user experience of the website.In the AnQiCMS navigation link configuration,PageIdThe field is a key element that is used in certain cases to achieve deep integration with navigation and the internal content of the website.

When we set up the website navigation in the AnQiCMS admin interface,PageIdThe field is part of the structure of each navigation link. Its main purpose is to store a numerical ID pointing to a specific content entity within the AnQiCMS system. According tonavListThe tag's documentation note, this field is assigned when the administrator chooses to set the 'link type' of the navigation item to 'category page link'.

To be specific,PageIdThe scenario where the field is filled occurs when the website administrator decides to associate a navigation link directly with a "category" or "single page" created in the AnQiCMS system.In the "Website Navigation Settings" feature on the backend, when editing or creating a new navigation link, if the "Link Type" is selected as "Category Page Link", the system will provide an option for administrators to accurately select one from the existing category list (such as "Company News", "Product Display") or a single page list (such as "About Us", "Contact Us").Once the selection is complete, the unique ID of the selected category or single page will be automatically stored in the corresponding navigation item.PageIdin the field.

PageIdThe true value lies in its ability to provide dynamic access to associated content for front-end templates. ThroughnavListnavigation data obtained from the tag, front-end developers can detect each navigation item'sPageIdDoes it exist. IfPageIdIf there is a value, you can use this ID, combined with other content tags provided by AnQiCMS (such asarchiveListUsed to get the document list,categoryListUsed to obtain the category list, further query and display rich content associated with the navigation item.

For example, if a website's navigation menu item is configured to link to a product category, then the navigation item'sPageIdThe ID of the product category will be stored. In the front-end template, we can iterate over the navigation list, and when we identify the navigation item linked to the product category, we can use it.PageIdascategoryIdThe parameter, callarchiveListLabel, dynamically display the latest or popular product documents under the product category below this navigation item or in the submenu.This mechanism makes navigation more than just a simple page jump, but also becomes an intelligent content aggregation and display entrance.

Another common application is to build multi-level navigation menus. If a first-level navigation item links to a main category and we want to display all the second-level subcategories under that main category in its dropdown menu, then the first-level navigation item'sPageIdIt came in handy. Template developers can make use of itPageIdAs the parent ID (parentId), callingcategoryListLabel, dynamically generate and display the list of these secondary subcategories, thereby building a multi-level navigation structure with more hierarchy and user-friendliness.

UnderstandPageIdThe function, also helps us better understand the differences in the different types of navigation links in AnQiCMS.

  • Built-in links:For example, links pointing to the homepage of a website or the homepage of a specific model (such as an article model or product model), these are system preset general links that do not directly associate with specific categories or single pages, therefore theirPageIdThe field is usually empty or has no actual meaning.
  • External links:When the navigation item points to an arbitrary external URL,PageIdThe field is not used because this link does not have a direct binding relationship with any content entity within AnQiCMS.

Therefore,PageIdIs a mechanism unique to AnQiCMS, which is specifically designed to serve the need to accurately bind navigation menu items to internal structured content (categories or single pages). By ingeniously utilizingPageIdThe website operator can build a more intelligent, flexible, and easy-to-maintain navigation system, effectively improving the efficiency of user content discovery and the overall browsing experience.

Frequently Asked Questions

  • Q: Why is my navigation link pointing to a category, but the field obtained in the template is empty?PageIdThe field is also not assigned by the system.A: Please check the configuration of the navigation link in the "Website Navigation Settings" on the AnQiCMS backend.Ensure that the "link type" is clearly selected as "category page link" and that you have indeed selected a specific category or single page from the drop-down menu.If the selected type is "Internal Link" or "External Link", even if the link ultimately points to a category page,PageIdThe field is also not assigned by the system.
  • Q:PageIdCan the field be used directly to obtain the details of a specific document?A:PageIdThe value stored is usually the category or single page ID in the AnQiCMS system, not the specific document ID.If you want to navigate directly to a specific document through a navigation link, you usually choose the 'External Link' type and manually fill in the complete URL of the document.Of course, in the front-end template, you can first navigate through the navigation item'sPageIdGot the category ID, use it furtherarchiveListTag query the documents under the category.
  • Q: If a navigation item links to a category, how can I utilize it in the template?PageIdTo obtain the details of the category (such as title, description, etc.)?A: You can use the AnQiCMS providedcategoryDetailtags, and pass the navigation item'sPageIdasidparameters to get the detailed information of the category. For example,{% categoryDetail navCategory with id=item.PageId %}, and then you can go throughnavCategory.Title/navCategory.DescriptionUsing variables to obtain the title and description of the category and other data.

Related articles

How to judge whether the `item.NavList` field exists in the Anqi CMS template?

As a senior Anqi CMS website operator, I am fully aware that a well-structured, user-friendly navigation system is crucial for the user experience and search engine optimization of a website.Multilevel navigation, especially navigation with submenus, can help users quickly locate the information they need and improve the overall usability of the website.In AnQi CMS template, the `item.NavList` field is the key to achieving this function.

2025-11-06

How to configure a language switch link with icon or Emoji in AnQi CMS navigation?

As a senior CMS website operator for an information security company, I fully understand that building a user-friendly and powerful multilingual website is crucial for expanding the market.AnQi CMS with its flexible multilingual support, allows you to easily provide customized content experiences for visitors from different regions.Today, I will give a detailed introduction on how to elegantly configure a language switch link with icons or Emoji in your Anqi CMS website navigation.

2025-11-06

How to judge whether the current navigation is selected in the `navList` loop with `item.IsCurrent`?

As an experienced CMS website operation personnel of an enterprise, I am well aware of the importance of content presentation to user experience and website effect.A straightforward, responsive navigation system is the first step for users to browse a website, and clearly identifying the current page's position in the navigation is also a key detail to enhance user experience.Today, let's delve deeply into how to cleverly use the `item.IsCurrent` property in the `navList` loop to determine whether the current navigation item is selected in AnQiCMS.

2025-11-06

Does the Anqi CMS backend currently support drag and drop sorting of navigation links?

As a staff member who deeply understands the operation of AnQiCMS, I understand the importance of website navigation for user experience and information architecture.A clear and easy-to-manage navigation system is the foundation of a successful website.Regarding whether the Anqi CMS backend currently supports drag-and-drop sorting of navigation links, I will explain it in detail for you.In the AnQi CMS backend management system, the navigation link management function is designed to be intuitive and practical, aiming to help operations personnel efficiently organize website content.

2025-11-06

How to implement dynamic styles for navigation links in Anqi CMS template, such as highlighting the current page?

In website operation, the navigation bar is not only the entrance for users to explore the content of the website, but also a key factor in enhancing user experience and the professionalism of the website.A smart highlight navigation system that can intuitively tell the user 'where are you', thus greatly improving the ease of use of the website.As an experienced AnQi CMS operator, I am well aware of the strength of its template system. Next, I will detail how to implement dynamic highlighting of navigation links in the AnQi CMS template.### Overview of AnQi CMS navigation mechanism The template engine of AnQi CMS uses syntax similar to Django

2025-11-06

Can I set a navigation link in AnQi CMS that displays both Chinese and English subtitles?

As website operators who deeply understand the operation of AnQiCMS, we are well aware that in today's world where content globalization and user experience are increasingly important, how to flexibly display multilingual information is a key issue many operators face.In response to your inquiry about whether the AnQi CMS navigation link can display both Chinese and English subtitles, I can clearly tell you that AnQi CMS provides comprehensive support for this feature.

2025-11-06

What will AnQi CMS do to sort navigation links if the 'display order' numbers are the same?

As a long-term website operator dealing with Anqi CMS, I am well aware of the importance of the navigation system for website user experience and content presentation.AnQi CMS provides us with flexible navigation management functions, among which the 'Display Order' field is the key to controlling the arrangement of navigation items.For website visitors, a clear and logical navigation structure is the foundation for quickly finding the information they need.The initial design of "Display Order" in AnQi CMS is to allow operators to precisely control the arrangement of navigation links.Its basic logic is very intuitive

2025-11-06

How do navigation links adapt to sites in different languages when AnQi CMS supports multi-language?

As a website operator who is deeply familiar with the operation of AnQiCMS, I know that a flexible and efficient multilingual support system is crucial for expanding the international market and improving user experience.AnQiCMS provides powerful functions in this field, especially in how navigation links adapt to sites of different languages. It ensures smooth and user expectations of global content display through intelligent mechanisms and flexible template tags.

2025-11-06