How do the `pageList` and `pageDetail` tags manage and display the single-page content of a website?

Calendar 👁️ 70

In website operation, single-page content (such as "About Us", "Contact Information", "Service Introduction", etc.) plays a vital role.They are usually carriers for displaying corporate core information, brand stories, or specific service details.To efficiently manage and display these pages, AnQiCMS providedpageListandpageDetailTwo core tags make the organization and presentation of content both flexible and convenient.

Background management of single-page content.

In the AnQiCMS backend, single-page content is centrally managed under 'Page Resources' under 'Page Management'.Here, you can create, edit, delete, and configure various settings for a single page.

Create or edit a single page, the system provides a wealth of fields for you to fill in:

  1. Page NameThis is the main title of the page, also the name displayed to the user on the front end.
  2. SEO title, keywords, descriptionThese are for search engine optimization, you can set TDK (Title, Description, Keywords) separately for each single page to improve the page's performance in search engines.
  3. Custom URL: Set a concise and meaningful URL alias for the page, which is not only helpful for user memory but also an important aspect of SEO-friendly.The system will automatically generate a pinyin URL based on the page name, and you can also manually modify it.
  4. Single page introductionA brief summary of the page content, which can be used for list display or Meta Description.
  5. Single page contentThis is the main content of the page, AnQiCMS provides a powerful rich text editor that supports mixed text and images, and even supports Markdown syntax after enabling the Markdown editor, making content creation more efficient.
  6. Display orderControl the order of the single page in the list.
  7. Single page template: You can specify an independent template file for a specific single page. For example, to design a dedicated layout for the "Contact Us" page, simply select the corresponding template file in the backend (such ascontact.htmlEnsure that the file exists in your template design package. AnQiCMS supports this by default.page/detail.htmlorpage/detail-{单页ID}.htmlSuch template naming conventions.
  8. Banner image, thumbnailUpload images related to the page theme, used to display an eye-catching Banner at the top of the page or as a thumbnail on the list page.

These backend settings are the foundation for the front-end tags to be flexible in calling and displaying.

pageDetailTag: Fine-grained display of individual page content.

When we want to display a specific single-page content on the website front end,pageDetailThe tag is your helpful assistant. It allows you to accurately retrieve and display any field of the page based on the page ID or a custom URL alias (token).

main purpose:

  • Build the 'About Us' page to display the company profile.
  • Create the 'Contact Us' page to show contact information and a map.
  • Show a detailed introduction page for a service.

Usage method:pageDetailThe core of the tag lies in passing throughnameThe parameter specifies the specific field you want to retrieve.

{# 假设这是“关于我们”页面的模板文件 (page/detail.html 或 page/about-us.html) #}
<article>
    <h1 class="page-title">{% pageDetail with name="Title" %}</h1> {# 获取当前页面的标题 #}
    <div class="page-meta">
        <span>更新时间:{% pageDetail with name="UpdatedTime" format="2006-01-02" %}</span>
    </div>
    <div class="page-content">
        {# 获取页面主体内容,使用 |safe 过滤器确保HTML正确渲染 #}
        {%- pageDetail pageContent with name="Content" %}
        {{ pageContent|safe }}
    </div>

    {# 假设页面设置了Banner图,获取第一张作为背景 #}
    {%- pageDetail bannerImages with name="Images" %}
    {%- if bannerImages %}
    <div class="page-banner" style="background-image: url({{ bannerImages[0] }});"></div>
    {%- endif %}

    {# 您也可以指定其他页面的内容,例如,在首页展示ID为1的单页面简介 #}
    <div class="homepage-about-snippet">
        <h2>{% pageDetail with name="Title" id="1" %}</h2>
        <p>{% pageDetail with name="Description" id="1" %}</p>
        <a href="{% pageDetail with name="Link" id="1" %}">了解更多</a>
    </div>

    {# 或者通过自定义URL别名来获取,例如别名为'contact-us'的联系页面 #}
    <div class="contact-info">
        <h3>联系我们</h3>
        <p>地址:{% pageDetail with name="Address" token="contact-us" %}</p>
        <p>电话:{% pageDetail with name="Phone" token="contact-us" %}</p>
    </div>
</article>

Key field:

  • Id: Single page ID.
  • Title: Page title.
  • LinkPage link.
  • DescriptionPage description.
  • ContentPage main content, usually need to combine|safewith a filter to correctly render the HTML.
  • LogoPage main image or thumbnail.
  • Images: The page's Banner gallery, usually an array, can be[0]get the first one.
  • UpdatedTime,CreatedTime: The creation and update time of the page, can beformatformatted using the parameter.

pageListLabel: Flexible display of multiple page links

If you need to list multiple single pages on a page, such as displaying all service page links at the bottom of the website, or showing a 'quick links' list in the sidebar,pageListLabels come in handy. It retrieves all the single pages you create in the background.

main purpose:

  • Display navigation links to common pages such as "Services", "About", etc. at the bottom of the website.
  • Create a list in the sidebar that links to key single pages.
  • Build a "All Pages"

Related articles

How to use `categoryList` and `categoryDetail` tags to build and display category navigation and details?

In website content management, category navigation and detail pages are the core paths for users to browse the website and obtain information, as well as an important basis for search engines to understand the website structure.A clear and intuitive classification system not only greatly enhances the user experience, but also effectively helps the website's SEO performance.For users of Anqi CMS, flexibly using the `categoryList` and `categoryDetail` template tags provided by the system can easily build powerful, beautiful, and practical classification navigation and detail display.--- ### One

2025-11-08

How is the `archiveDetail` tag used to retrieve and display detailed content information for a single document?

In AnQi CMS, the `archiveDetail` tag is a very core and practical tool for template creation, mainly used to retrieve and display detailed content information of a single document.Whether it is a blog post, product details, news report, or any other page content that needs to be independently displayed, `archiveDetail` can help you flexibly extract and present it on the website's front-end page.### `archiveDetail` Tag Core Function Overview The purpose of this tag is to provide rich data support for a single document

2025-11-08

How to use the `archiveList` tag in AnQiCMS templates to flexibly display document lists?

In AnQi CMS, when we need to dynamically display articles, products, or other document lists on the website, the `archiveList` tag is an indispensable core tool.It provides high flexibility and powerful features, whether you want to display the latest content, hot articles, products in specific categories, or even generate lists based on keyword search or custom filtering conditions, `archiveList` can easily handle it.### `archiveList` core functionality and basic usage `archiveList`

2025-11-08

How to set up independent templates for specific documents, categories, or single pages to control their display styles?

In AnQiCMS, setting up independent templates for specific documents, categories, or single pages is a key feature for achieving personalized content display and enhancing user experience on the website.This not only makes the website design more flexible, but also allows for precise style control for different types of content, thus better satisfying the brand positioning and content operation strategy.### Understanding AnQiCMS Template Mechanism AnQiCMS provides two main ways to apply custom templates: one is that the system automatically identifies and loads templates based on file naming rules

2025-11-08

How to display the `tagList` and `tagDataList` tags showing the website tags and related document list?

In website operation, a tag (Tag) is an extremely useful content organization tool.They can not only help users find the content they are interested in faster, improve the user experience of the website, but also optimize the search engine's crawling and understanding of the website content, and have a positive effect on SEO performance.The AnQi CMS provides website administrators with a powerful and flexible tag management feature, through the `tagList` and `tagDataList` template tags, we can easily display tag lists and documents related to specific tags on the website.###

2025-11-08

How to use the `navList` tag to create and display multi-level navigation menus to optimize user browsing?

In website operation, a clear and intuitive navigation system is a key factor in improving user experience, guiding users to explore content, and even optimizing search engine rankings.A well-designed multi-level navigation menu can help visitors quickly find the information they need, reduce the bounce rate, and effectively enhance the in-depth access to website content.In AnqiCMS, the `navList` tag is the core tool to achieve this goal, allowing us to flexibly build and display hierarchical navigation menus to optimize the user's browsing path.### Understand the `navList` tag

2025-11-08

How to automatically generate and display the `breadcrumb` tag showing the user's current location in the breadcrumb navigation?

During website browsing, you may often see a line of text links at the top of the page or above the content area, like breadcrumbs, indicating your current position in the website and the path to get here.This is what we commonly call 'Breadcrumb Navigation'.It can not only help users quickly understand their hierarchical structure on the website, avoid getting lost, but also improve the usability of the website and play a positive role in search engine optimization (SEO).For AnQiCMS users, implementing such a feature is very simple and efficient

2025-11-08

How does the `pagination` tag add and control pagination display for document lists to enhance user experience?

When building a website, as the amount of content grows, the document list page becomes long, which not only affects the page loading speed but also makes it difficult for visitors to find the information they need efficiently.At this time, adding pagination to the document list becomes a key factor in improving user experience.AnQiCMS provides a powerful `pagination` tag, combined with the document list tag `archiveList`, it can easily achieve this goal, making your website content display more professional and more user-friendly.

2025-11-08