How does AnQiCMS manage and display single-page content, such as 'About Us' or 'Contact Us'?

Calendar 👁️ 71

In website operation, we often need to create some relatively fixed and information-rich independent pages, such as "About Us", "Contact Us", "Terms of Service", or "Privacy Policy" and so on.These pages are usually called single-page content, they are an indispensable part of the website, used to provide core information to visitors, build trust, or guide operations.

AnQiCMS provides an intuitive and flexible solution for managing and displaying this type of single-page content.It treats a single page as a special content type, allowing us to easily create, edit, and publish it like articles or products, and realize diverse display effects through templates.

One, AnQiCMS Overview of Single Page Content Management

AnQiCMS manages the single-page content in the background "Page Resources" module, where you can find the "Page Management" feature.After opening, you will see a clear list showing all the single pages created, as well as their basic information.This is the starting point for creating, editing, and deleting single-page content, and the entire process is very smooth and convenient.

The main difference between a single-page and a regular article or product is that they usually do not have a category concept, or they themselves represent a kind of independent "category".This makes the management logic of a single page simpler, we do not need to set up a complex classification structure for them.

Two, Creating and Editing Single Page Content: Field Details and Practice

When you click on "Add single page" or edit an existing page in "Page Management", you will see a series of intuitive fields that together make up the complete information of a single page:

  1. Page name:This is the most direct identifier for a single page, such as "About Us." It is displayed in the background management list and is also an important source for the title or navigation name on the front-end page.
  2. Custom URL:To facilitate user memorization and search engine optimization (SEO), AnQiCMS allows you to set a friendly, static URL for a single page. For example, set the URL of the "About Us" page to/about.html. The system will automatically generate a pinyin URL based on the page name, but you can also manually modify it to ensure its uniqueness.A clear and concise URL helps improve the accessibility and SEO performance of a page.
  3. Single page content:This is the core of a single-page, a feature-rich rich text editor that allows you to easily edit text, insert images, embed videos, set formats, and more.Even, AnQiCMS also supports Markdown editors, which means you can conveniently use Markdown syntax to write content and beautifully render it on the front end.For a static information page, this is where you display all the details.
  4. SEO title, keywords and description:These fields are crucial for search engine optimization.
    • SEO titleUsed to inform search engines of the core topic of the page, which is often displayed in search results.
    • KeywordsThe words you hope to search for on this page, separated by English commas.
    • Single page introductionProvide a summary description of the page, which is often used by search engines as a summary of search results. Filling in this information can effectively improve the visibility of a single page in search engines.
  5. Banner image and thumbnail:These are the visual elements of the page.
    • Banner imageApplicable to situations where a large background image or carousel needs to be displayed at the top of the page, adding visual appeal.
    • ThumbnailIt may be used as a preview image on some list pages or when shared on social media.
  6. Display order:When you need to display multiple single pages in a specific order on the front-end (such as in the footer navigation), this field can help you adjust their order, with smaller numbers appearing earlier.
  7. Single page template: This is a powerful and flexible feature of AnQiCMS on single-page display. By default, all single pages will usepage/detail.htmlThis template file is displayed. However, if a single page (such as "Contact Us") requires a unique layout or style, you can:
    • Create a folder named under your template directory.page/contact.html(Assuming your custom URL alias iscontactorpage/{单页ID}.htmltemplate file.
    • Then edit the single page in the background, fill in the "Single Page Template" field withcontact.html. This page will automatically load and use the one you specifiedcontact.htmltemplate instead of the default onepage/detail.htmlThis provides designers and developers with great freedom, allowing for customized appearances for each important single-page design.

3. Display Strategy of Single-Page Content and Template Call

In the AnQiCMS front-end template, you can call and display these single-page contents through specific tags. This mainly depends onpageDetailandpageListtwo tags.

  1. Display detailed content of a single page (pageDetail):This is the most commonly used method, usually forpage/detail.htmlor in a custom single-page template. For example, to display the title and content of the "About Us" page:

    <h1>{% pageDetail with name="Title" %}</h1>
    <div class="page-content">
        {# 注意:如果内容是HTML格式,需要使用 |safe 过滤器防止被转义 #}
        {% pageDetail pageContent with name="Content" %}{{ pageContent|safe }}
    </div>
    

    You can also go throughidortokenThe parameter specifies the content of a specific single page, not just the content of the current page. For example, calling the introduction of "About Us" on the homepage of the website:

    {% pageDetail aboutUs with name="Description" token="about-us" %}
    <p>{{ aboutUs }}</p>
    
  2. List multiple single-page information (pageList):When you need to list multiple single-page links in the footer, sidebar, or other navigation areas of a website,pageListThe tag comes in handy. For example, show links to "About Us", "Contact Us", and "Privacy Policy" in the footer:

    <ul>
    {% pageList pages %}
        {% for item in pages %}
            {# 可以根据页面ID或自定义URL别名排除不需要的页面 #}
            {% if item.Id != 999 and item.Link != "/some-excluded-page.html" %}
            <li><a href="{{ item.Link }}">{{ item.Title }}</a></li>
            {% endif %}
        {% endfor %}
    {% endpageList %}
    </ul>
    

    This label will retrieve all the single pages created, you can filter and sort according toitem.Idoritem.Linkthese fields to meet the needs of the front-end display.

Through the above management and call methods, AnQiCMS provides us with a powerful and flexible platform that can efficiently handle various single-page content of the website, whether it is a simple information display or a special page requiring unique design, it can handle it with ease.


Frequently Asked Questions (FAQ)

1. Can I design a completely different layout for each single page?Yes, AnQiCMS offers high flexibility. You can specify a custom template file (for exampledownload.htmlormy-unique-about-page.html)。Just as long as this template file exists in your theme directory (such astemplate/your_theme/page/my-unique-about-page.htmlThe single page will load and use the template you specify for rendering. This allows you to achieve fully customized design for each important single page.

2. Does the single-page content editor support image upload and formatting?Of course, it supports. The single-page content editor in AnQiCMS backend is a feature-rich rich text editor.You can directly upload images, insert videos, and format text with bold, italic, lists, quotes, and more in the editor.In addition, if the Markdown editor is enabled, you can also use Markdown syntax to quickly write and format content.The editor also supports referencing images uploaded in the image resource management.

3. If my single-page content is not displayed correctly or the style is messed up, what should I check?First, confirm that the template name you have entered in the "Single Page Template" field in the background is correct, and that the template file actually exists in your theme directory. Second, if the content is in HTML format, make sure to use it in the template.{% pageDetail pageContent with name="Content" %}{{ pageContent|safe }}This way of calling, among other things|safeThe filter is required, it tells AnQiCMS not to escape the content with HTML.If the style is chaotic, it is likely that the CSS file has not been loaded correctly, check whether the reference path of the CSS file in the template is correct, or whether there are conflicting rules with the global style in the custom template.

Related articles

How to correctly display Markdown formatted mathematical formulas and flowcharts in AnQiCMS?

For users who often need to publish technical articles, tutorials, or academic content, the Markdown editor is undoubtedly a tool that improves efficiency.Its concise syntax makes content creation intuitive and quick. AnQiCMS, as a modern content management system, naturally takes full consideration of the use scenarios of Markdown and provides strong support.However, when we need to insert complex mathematical formulas or draw intuitive flowcharts in Markdown-formatted articles, relying solely on the features of Markdown itself is not enough. At this point

2025-11-07

How to implement custom display templates for category pages in AnQiCMS?

AnQiCMS provides excellent flexibility in website content management, especially when dealing with category page displays. It is not limited to a single fixed layout but allows users to set personalized display templates for category pages based on different business needs and design concepts.This is undoubtedly a very practical feature for operators who hope to improve user experience, strengthen brand image, or optimize specific SEO strategies through differentiated content display.How is it specifically implemented to customize the display template of the category page in AnQiCMS?

2025-11-07

How to call and display the title, content, and related fields of a document on the AnQiCMS article detail page?

In AnQiCMS, the content detail page is the key area where you display core information and attract readers.Effectively call and display the title, content, and various related fields of the document, which can greatly enhance user experience and the richness of page information.The powerful template engine of AnQiCMS provides an intuitive and flexible way to achieve these goals.## Understanding AnQiCMS Template Syntax AnQiCMS's template system uses syntax similar to Django template engine, it mainly operates data and logic through two forms: * **Double Curly Braces

2025-11-07

How to use AnQiCMS template tags to retrieve and display the system configuration information of the website?

In Anqi CMS, the system configuration information of the website is the foundation for its operation, including the website name, Logo, filing number, address, and other core data.This information is usually needed to be dynamically displayed on various pages of the website (such as the header, footer, contact us page, etc.) to maintain consistency.To facilitate template developers and content operators to efficiently manage and display this information, AnQiCMS provides a simple and powerful template tag that allows you to flexibly obtain and display the system configuration of the website.Where is the system setting of AnQi CMS? First

2025-11-07

How to filter and sort articles by category ID and recommendation attributes when displaying the article list in AnQiCMS?

How to effectively organize and present article lists in a content management system is a key factor that directly affects user experience and website information architecture.AnQiCMS provides a flexible and powerful template tag that allows us to refine and sort articles based on category ID and recommended attributes, thereby achieving accurate content placement and optimized display. ### Understanding the `archiveList` article list tag The display of AnQiCMS article lists depends on the `archiveList` template tag.It is like a universal content query tool

2025-11-07

How to implement nested list display of multi-level categories in AnQiCMS templates?

The navigation structure of the website is the core of user experience, a clear and organized multi-level classification list can not only help users quickly find the content they need, but also effectively improve the website's SEO performance.In AnQiCMS, with its flexible template tag system, achieving the intuitive and efficient display of nested list categories becomes straightforward. ### Understanding AnQiCMS's Classification Structure In the AnQiCMS admin interface, you will find that the classification function allows you to create classifications with hierarchical relationships.This means you can write an article for

2025-11-07

How does AnQiCMS automatically handle image thumbnails to optimize the display speed of website content?

In today's fast-paced online world, the speed of displaying website content, especially the speed of image loading, directly affects user experience, website bounce rate, and even search engine rankings.Large images are often the culprits that slow down website speed, but without them, the content can become dull and boring.How can one have the cake and eat it too, showing high-quality images while ensuring the website content loads quickly?

2025-11-07

How to configure AnQiCMS's pseudo-static rules to achieve personalized URL display?

## Optimize URL structure, create personalized website links: AnQiCMS Static Rule Configuration Guide In website operations, URL (Uniform Resource Locator) is not only the address of content, but also an important part of Search Engine Optimization (SEO) and User Experience (UX).A clear, meaningful, and easy-to-remember URL structure that can effectively improve a website's ranking in search engines, as well as allow visitors to understand the page content more intuitively.

2025-11-07