How does AnQi CMS display detailed content of a single page (such as About Us, Contact Information)?

Calendar 👁️ 70

In website operation, pages such as "About Us", "Contact Information", and "Privacy Policy" play a vital role. They are the basis for showing visitors corporate information and building trust.AnQiCMS as an efficient content management system, provides a very flexible and intuitive way to create and display the detailed content of these single pages.

Understand the positioning of independent pages in AnQiCMS

AnQiCMS classifies this type of page as a "single page", which is different from the conventional articles or product lists, each single page usually carries a unique, non-periodic updated information.The system provides a dedicated management entry and rich customization options for these pages, ensuring that you can easily publish and update them.

Create and manage independent pages in the AnQiCMS backend

To start creating a standalone page, just log in to the AnQiCMS backend, navigate to the left menu's 'Page Resources', and click 'Page Management'.In here, you can add new pages or edit existing ones.

When adding or editing a page, you will see a series of fields that help you fully define this page:

  • Page NameThis is the title displayed on your page in the front-end, for example 'About Us' or 'Contact Us'.
  • SEO title, keywords and descriptionThese fields are designed specifically for search engine optimization to help your page gain better visibility in search results. You can fill in relevant SEO information based on the content of the page.
  • Custom URL: AnQiCMS allows you to set a simple, friendly URL address for the page (for example/about-usor/contact), this is not only beautiful, but also helps to improve SEO effectiveness.The system will automatically generate a Pinyin URL based on the page name you enter, and you can also manually modify it as needed.
  • Single page contentThis is the core of the page, where you can enter all the details.AnQiCMS provides a rich-featured editor that supports mixed layout of text and images, video insertion, code display, and other forms of content.It is worth mentioning that if the Markdown editor is enabled on the backend, you can even write content directly using Markdown syntax. The system will automatically convert it to HTML on the front end, making content creation more efficient.
  • Single page templateThis is a powerful feature provided by AnQiCMS, you can specify a unique template file for a specific single page.This means that the "About Us" page can have style A, while the "Contact Us" page can have style B, achieving a highly personalized display.If not specified, the page will use the default onepage/detail.htmlTemplate.
  • Banner image and thumbnailIf your page needs to display a header banner or list thumbnails, you can upload the corresponding images here.

By these detailed settings, you can ensure that each independent page has a clear structure, optimized content, and a unique display style.

Third, display independent page content in the front-end template

After you create an independent page in the background, the next step is how to display the content in your website's front-end template. AnQiCMS provides special template tags.pageDetailAchieve this with ease.

Generally, the details of a standalone page will usepage/detail.htmlor the custom template file specified in your backend. In this template file, you can utilizepageDetailLabel to retrieve and render various data on the page.

Here are some commonly usedpageDetailUsage example of the label, used to retrieve page title, content, description, etc.:

  • Retrieve page title:<h1>{% pageDetail with name="Title" %}</h1>If you want the title to include the website name, you can write it like this:<h1>{% pageDetail with name="Title" siteName=true %}</h1>

  • Get the main content of the pageThe main text content of the page usually contains HTML rich text, therefore it needs to be output using|safea filter to prevent HTML tags from being escaped, ensuring that the content is rendered correctly.

    <article>
        {% pageDetail pageContent with name="Content" %}
        {{ pageContent|safe }}
    </article>
    
  • Get page description (for Meta tags):<meta name="description" content="{% pageDetail with name="Description" %}">

  • Get page banner image or thumbnail: If your page has set a Banner image and you want to display it as a background or image:

    {% pageDetail pageBannerImages with name="Images" %}
    {% if pageBannerImages %}
        <div class="page-banner" style="background-image: url('{{ pageBannerImages[0] }}');"></div>
    {% endif %}
    

    HerepageBannerImages[0]means to get the first uploaded image.

By these tags, you can flexibly display various information entered in the background on any position of the website.pageDetailThe tag automatically identifies the ID or URL alias of the current page to retrieve data for the corresponding page. If you need to getspecific IDThe independent page content (for example, displaying a fixed ID "About Us" introduction on the homepage), you can alsoidto specify the parameters:

<div>这是我的公司简介:{% pageDetail with name="Content" id="10" %}|safe}}</div>(Assuming ID 10 is the "About Us" page)

AnQiCMS's template system also supports Django template engine syntax, which means you can combineif/forLabels for logic, to implement more complex page layout and conditional display. For example, judge whether there is a Banner image, and then decide whether to display a certain area.

Four, actual case: build an independent "Contact Us" page

Let's connect the whole process through a simple "Contact Us" page

  1. Create a page in the background:

    • Enter "Page Resources" -> "Page Management", click "Add New Page".
    • Page Name:联系我们
    • SEO title:联系我们 - [您的公司名称]
    • Custom URL:contact
    • Single page content:Please enter your company address, phone number, email, map embed code, and other detailed information in the editor.
    • Single page template:You can leave it blank to use the default.page/detail.html,or to have more precise control, create apage/contact.htmlSpecify here.
    • Click to save.
  2. Front-end template writing (withpage/detail.htmlfor example): In yourtemplate/default/page/detail.htmlfile (orpage/contact.html),You can organize the code to display content:

    ``twig <!DOCTYPE html>

    <meta charset="UTF-8">
    {# 使用tdk标签获取页面的SEO标题,并带上网站名称后缀 #}
    <title>{% tdk with name="Title" siteName=true %}</title>
    {# 获取页面的SEO描述 #}
    <meta name="description" content="{% tdk with
    

Related articles

How to dynamically display the name, description, and link of content categories in a template?

In website operation, clearly displaying content categories not only helps users quickly find the information they need, but is also a key link to improve website usability and search engine optimization (SEO).AnQiCMS (AnQiCMS) with its flexible template engine allows us to easily dynamically call and display the names, descriptions, and links of various content categories in website templates.Today, let's delve deeper into how to achieve this goal in templates, making your website content more vivid and efficient.### Understanding Content Classification in AnQi CMS In the AnQi CMS backend management system

2025-11-08

How to retrieve and display custom parameters of content models such as articles, products, etc. in a template?

In Anqi CMS, when managing website content, we often encounter the need to display specific information in addition to standard fields such as title and text.For example, when operating an e-commerce website, in addition to the name and description of the product, it may also be necessary to display 'material', 'origin', 'warranty period', and so on;Or you may be running an information blog, where articles may need to display 'author source', 'publisher' and other information.The flexible content model design of AnQi CMS is to meet this diverse content display requirement.Today, let's delve deeper into the topic

2025-11-08

How does Anqi CMS handle images in content to optimize loading speed and display quality (WebP, compression)?

In the content of the website, images play a crucial role, they can enrich the visual effects and convey complex information.However, unoptimized images are often the culprit for slow website loading and poor user experience.As content operators, we fully understand the value of image optimization in improving website performance and user retention.AnQiCMS provides a series of powerful and intelligent functions in image processing, aiming to help us easily achieve a balance between image loading speed and display quality.

2025-11-08

How to embed and display mathematical formulas or flowcharts from the Markdown editor in the content?

In modern content operation, the professionalism and readability of the content are equally important.Especially when our website involves fields such as science, education, engineering, and so on, how to clearly and beautifully present complex mathematical formulas or logically rigorous flowcharts in articles often becomes the key to improving user experience.AnQi CMS understands this need, integrating a powerful Markdown editor and combining it with simple frontend configuration, allowing your website to easily present these professional contents.### First Step

2025-11-08

How to display the list of article tags (Tag) and the related articles under each Tag?

AnQi CMS provides very flexible and powerful tools for content organization, among which tags (Tag) are a very intuitive and efficient tool.By using labels reasonably, not only can it help us better manage website content, but also significantly improve user experience and search engine optimization (SEO) effects.Next, let's take a look at how to display the list of article tags in Anqi CMS, as well as the related articles under each tag.### First step: Manage and create tags in the background Before using tags, make sure that our website content has been properly tagged

2025-11-08

How to implement pagination control for content list display in Anqi CMS?

In website operation, how to efficiently display and manage a large amount of content while ensuring a smooth browsing experience is a challenge that every webmaster needs to face.AnQiCMS provides an intuitive and powerful control capability for pagination display of content lists, allowing you to easily achieve an orderly presentation and efficient navigation of content.To implement the pagination display of content lists, we mainly use two core tags in Anqi CMS templates: content list tags (such as `archiveList`, `tagDataList`

2025-11-08

How to display custom contact information (such as phone, address, social media) in the template?

The contact information on the website is the key bridge between you and the visitors for establishing communication and trust.Whether seeking services, consulting products, or simply learning more information, clearly and accurately displaying contact information is crucial for improving user experience.AnQi CMS is an efficient and convenient content management system that provides an intuitive backend management interface and flexible template calling function, allowing you to easily manage these information and seamlessly present them on every corner of the website.This article will guide you in setting up these key contact information in Anqi CMS

2025-11-08

How to define and display different banner images for different parts of the website in AnQiCMS?

In website operation, banner images are important visual elements that attract visitor attention and convey key information.They can not only enhance the overall aesthetics of the website, but also guide users to browse specific content or participate in promotional activities.AnQiCMS provides a flexible mechanism that allows you to customize and display unique Banner images for different parts of the website, such as the homepage, various thematic category pages, or independent content pages, thereby achieving more refined visual marketing.

2025-11-08