What are the applications of the `pageDetail` and `pageList` tags in displaying single-page content and list presentation?

Calendar 👁️ 79

When building a website with AnQiCMS, the display of single-page content and page list is an indispensable component.Whether it is an independent content page like "About Us" or a series of links in the website footer navigation, they all need a flexible and efficient way to manage and display.In AnQiCMS,pageDetailandpageListThese tags are powerful tools designed to meet these needs.They each focus on different application scenarios, but also cooperate with each other to build a rich and orderly single-page content system on the website.

pageDetailLabel: Fine craftsmanship, presenting exclusive content

When we need to fully display the detailed content of an independent page on a page.pageDetailThe label comes in handy. Its core function is to retrieve all the details of a specified single page, such as the title, links, page description, complete page content, even the thumbnail image or multiple slide sets configured on the page.

UsepageDetailTags usually have two main ways to locate the page content you want. You can specify it precisely by the unique ID of the page, for example{% pageDetail with name="Title" id="1" %}If you prefer to use meaningful text identifiers, you can also refer to the page's URL alias (i.e., token), for example{% pageDetail with name="Content" token="about-us" %}Of course, if you are in a single page corresponding template file (such aspage/detail.htmlorpage/{单页ID}.html), you usually do not need to specify an ID or token,pageDetailThe label will intelligently retrieve information from the current page.

BypageDetailWe can easily call the carefully edited data from the background "Page Management" in the front-end template. For example, the "About Us" page of a website usually contains company profiles, development histories, and other rich text. These contents are through the background editing completed, by{% pageDetail with name="Content" %}Can be fully displayed on the front end. Similarly, if you configure a beautiful Banner image for the single page, you can also access and display it, adding visual appeal to the page.{% pageDetail pageImages with name="Images" %}to retrieve and display it, adding visual appeal to the page.

pageListLabel: flexible organization, building convenient navigation and index

withpageDetailFocuses on the details of a single page display, different, pageListThe tag focuses on obtaining a collection of single pages. Its main application scenarios are situations where multiple single-page links or brief information need to be listed, such as the navigation menu of a website, the bottom friend link area, or the 'Hot Single Page' recommendation in the sidebar.

pageListThe tag is very concise in use, usually no additional parameters are required, it will default to retrieving all single-page lists created.Once we get the list of pages, we can traverse them in a loop to sequentially extract the title, link, brief description, and thumbnail information of each page.

For example, in the footer of the website, you may need to list multiple single-page links such as "Privacy Policy", "Terms of Service", "Legal Statement", etc., at this pointpageListIt can be put to good use. With a simple loop, these links can be presented uniformly, saving the trouble of manually adding each link.

Furthermore,pageListAlthough it is default to get all pages, in practice, we often need to filter the list. AnQiCMS provides inforThe flexibility to perform conditional judgments within loops, for example, you can exclude a specific ID page in the loop, or only display pages that meet certain conditions, thereby achieving a more refined list display.

Collaboration: Boosting single-page content management like a tiger

pageDetailandpageListThese tags are the core capabilities provided by AnQiCMS in single-page content management.They jointly赋予网站powerful content organization and display flexibility.By using the "Page Management" feature on the backend, we can conveniently create, edit, and manage various single-page content, andpageDetailandpageListThey are responsible for presenting these background data efficiently and beautifully to the users.Whether it is to build a rich independent page or design a clear and convenient page navigation, these tags are indispensable tools that make the operation of single-page content simple and efficient.


Frequently Asked Questions (FAQ):

  1. How do I specifypageDetailTags to get the specific single-page content I want?Generally,pageDetailThe tag automatically retrieves information from the current page. But if you want to get the content of other specified pages, you can use the page ID (for exampleid="5") or the URL alias set in the background (token="about-us"Specify as a parameter.

  2. pageListThe tag has retrieved all single pages of the website, but I only want to display a few at a certain location. How do I do that? pageListCertainly, it will retrieve all single-page lists. You can usepageListWhen looping through tags on a page, you can add conditional judgments inside the loop to filter. For example, you can judgeitem.IdIs it the page ID you want to exclude or the judgmentitem.TitleWhether it contains specific keywords to only display pages that meet your needs.

  3. Does the content written in a single page support Markdown format? If it supports, it is on the front endpageDetailHow to correctly render the tag after obtaining it?Yes, AnQiCMS single-page content supports Markdown format. After you turn on the Markdown editor in the background and write content using Markdown syntax,pageDetailTagging for obtainingContentThe field is automatically converted to HTML during frontend rendering. If you need to control the rendering process more precisely, you can also inpageDetaila tag toContentadd a fieldrender=trueorrender=falseThe parameter manually decides whether to perform Markdown to HTML conversion.

Related articles

How to use the `categoryList` tag to build a multi-level category navigation and control its display level?

The website's navigation system is like a map, guiding visitors smoothly to their destination.A well-organized, layered classification navigation that can significantly improve the user's browsing experience and also help search engines understand and index your website content more efficiently.In AnQi CMS, the `categoryList` tag is the tool to build a high-efficiency and flexible category navigation system.With it, you can easily display the website's category structure, even fine-tune the display level of each category.### `categoryList` Label Overview

2025-11-08

How does the `categoryDetail` tag help us retrieve and display detailed information for a specific category?

AnQiCMS (AnQiCMS) provides powerful and flexible tools for website content management, among which the `categoryDetail` tag plays a very important role in building a rich and structured website.It can help us accurately obtain and display detailed information about specific categories, whether it is used for the header introduction on the category list page or to display more content about the category in the article detail page, it is very convenient.### `categoryDetail` tag basic usage In simple terms

2025-11-08

How to use the `archiveList` tag to display document lists on different page types (such as lists, pagination, related documents)?

AnQi CMS provides strong support for website operators with its efficient and flexible content management capabilities.Among many practical features, the `archiveList` tag plays a core role, and it is a powerful tool for displaying various document lists on your website's front end.No matter if you want to display the latest articles on the homepage, present specific content on the category page, or recommend relevant information on the detail page, `archiveList` can help you achieve it with concise syntax.By reasonably configuring the `archiveList` tag parameters, you can easily master the way content is presented

2025-11-08

How to use the `archiveDetail` tag in AnQiCMS template to retrieve and display detailed information of a single document?

Under the powerful support of Anqi CMS, we can flexibly build various types of website content.Among them, displaying the detailed information of a single document is one of the core needs of website content display.AnQi CMS provides a special template tag——`archiveDetail`, which can help us easily obtain and present all relevant data of the document in the template.Using the `archiveDetail` tag, even users who are not very familiar with template language can quickly get started and transform technical information into a smooth reading experience on the website.##

2025-11-08

How to use the `tagDetail` and `tagDataList` tags to display information about a specific tab page and its associated documents?

AnQiCMS (AnQiCMS) is a flexible and efficient content management tool trusted by many operators.It is crucial to effectively present content classification and organization methods when building a functional and user-friendly website.Especially for the need to associate different content through "tags", mastering the use of the `tagDetail` and `tagDataList` template tags can make your website's tag page not only beautiful but also informative, greatly enhancing user experience and search engine optimization (SEO) effects.

2025-11-08

How to implement the `navList` tag for flexible display of top, bottom, or sidebar navigation menus on a website?

The website navigation is a guide for users to explore the website content and is also an important clue for search engines to understand the website structure.A well-designed, flexible navigation system that can greatly enhance user experience and website SEO performance.In AnQiCMS, the `navList` tag is just such a core tool that gives us great freedom, allowing us to easily build and manage navigation menus at various positions such as the top, bottom, and sidebars of the website.

2025-11-08

How to build a clear breadcrumb navigation through `breadcrumb` tags to enhance users' sense of positioning on the website?

In website operation, how to keep visitors from getting lost in the vast content while browsing, and maintain a clear sense of orientation, is a crucial issue.Imagine if a user delves into a page on a website and is unclear about where they came from or their level, they are likely to feel confused and even choose to leave.At this time, a well-designed and functional breadcrumb navigation can play a key role, it is like a 'road sign' in the digital world, providing users with a clear return path.AnQiCMS (AnQiCMS) is deeply skilled in content management and user experience

2025-11-08

How is the `bannerList` tag used to fetch and display the carousel of the website homepage or a specific group?

When building modern websites, the banner carousel is a commonly used element to enhance visual appeal and convey important information.They are usually located in prominent positions on websites, such as the top of the homepage, to display the latest activities, featured products, or important announcements.In AnQiCMS (AnQiCMS), managing and displaying these carousel images becomes very convenient, mainly due to its powerful template tag system, especially the `bannerList` tag.`bannerList`

2025-11-08