What ways does AnQi CMS support to individually present the detailed content of a single document?

Calendar 👁️ 54

When using Anqi CMS to manage website content, if you want each document's detailed content to be presented in a unique and eye-catching manner, the system provides very flexible personalized settings.This is not just about changing the text color or font size, but also about deep customization from the content structure to the display form.

Firstly, the foundation of personalized display lies inContent model and custom fields. Anqi CMS allows us to create different content models according to actual business needs, such as 'articles', 'products', 'news', and even 'cases'.Each model can have its own unique fields. For example, the 'Article' model may only need 'author' and 'publish date', while the 'Product' model can add detailed parameters such as 'price', 'inventory', 'brand', and 'material'.These custom fields greatly enrich the content dimensions of the document, providing data support for subsequent personalized display.

Next,Flexible use of templatesThe key to personalized presentation. Anqi CMS provides multi-level template customization capabilities:

  1. Default model template:The most basic personalization starts at the model level. For each content model (such as "article" or "product"), we can specify a default detail page template (usually{模型table}/detail.htmlFor examplearticle/detail.htmlorproduct/detail.html)。Thus, all documents belonging to the model will automatically adopt this template for display. If the product requires a special layout, it can be modifiedproduct/detail.html,and it will not affect the display of the article.

  2. Category-specific template:In some cases, all documents under a certain category need a special display style.For example, all products under the "Promotion Activities" category may need to display more promotional information.At this time, we can specify a "document template" in the settings when editing document categories.This template will override the default template at the model level, causing all documents in this category (regardless of their model, but ensuring that the template content is compatible) to use this dedicated template.

  3. Custom template for a single document:If we want to present a specific document uniquely, such as an important download page or a special product introduction page, Anqi CMS also supports the ability toSingle documentSpecify an independent template. When editing the document, simply enter the filename of the custom template (for exampledownload.html), the system will use this template to render the detailed content of the document first, with a higher priority than the category and model templates.

  4. Single page template: For pages such as "About Us" and "Contact Information", Anqi CMS provides a dedicated single-page management. These single pages can also be independently specified with templates, such as creating a template for the "About Us" page.page/about.htmltemplate file, to achieve its unique design style.

  5. Mobile exclusive template:To adapt to access from different devices, AnQi CMS supports responsive design, code adaptation, or independent PC and mobile site modes. In the latter two modes, we can set up a folder in the template.mobile/Subdirectory, and place the exclusive template files for mobile devices in it, ensuring that the content is presented in the most friendly way when accessed on mobile phones.

Inside the template,Rich template tags and filtersplaying the role of a data connector. By usingarchiveDetail/pageDetailTags, we can easily extract all standard fields such as the title, content, images, and publishing time of documents from the database. What's more powerful is thatarchiveParamstags or directly through{{archive.自定义字段名}}The way, we can accurately display the various custom fields (such as "product price", "inventory quantity", "author") defined in the content model on the page.

In addition, these tags support a variety of flexible parameters and filters to further beautify and process data:

  • Image processing: {{archive.Logo}}Can obtain the document cover image, and{{item.Images}}(Used for group images) andthumbThe filter can easily display thumbnails or process image size.
  • Content rendering: {{archive.Content|safe}}Used to safely render rich text content, to prevent HTML tags from being escaped. If the document content is in Markdown format,renderThe filter can also help us convert it into beautiful HTML.
  • Date format: stampToDateTags can convert the timestamp into the date and time format we need, for example:{{stampToDate(archive.CreatedTime, "2006-01-02")}}.
  • Logical control and loops: ifTags can be displayed or hidden based on conditions,forLoops can iterate through image groups, related product lists, etc., to achieve dynamic layouts.

By the collaborative effect of these functional points, whether it is to display product details with specific price parameters or to present a layout unique activity introduction, AnQi CMS can help us achieve highly personalized content display, so that each document can be displayed in the most suitable way for its content characteristics in front of users.


Frequently Asked Questions (FAQ):

  1. How can I make the detail page layout of my "news" model and "product" model completely different? Answer:You can create or modify them separatelynews/detail.htmlandproduct/detail.htmlThese models default templates. In the background content model management, ensure that the "news" model and the "product" model are each associated with their corresponding table names and URL aliases, and then the system will automatically render the documents of these two models separately to the different templates you design.

  2. Ask: How can I display the additional information such as the material and warranty period that I have added for the product on the product details page? Answer:First, find your "product" model in the content model management, add custom fields named "material" and "warranty period". Then on the product detail page template (for exampleproduct/detail.htmlIn it, you can use{% archiveParams params %}Label to iterate and display all custom parameters, or use it directly{{archive.材质}}and{{archive.保修期}}To accurately call the values of these fields.

  3. Ask: If I have a very important product, can I make its detail page use a unique layout instead of the general layout of its category or model? Answer:Can. When editing the specific product document, find the 'Document Template' field, and fill in the template filename you have designed separately for this document (for examplevip_product_detail.html). Make sure thisvip_product_detail.htmlThe file exists in your template directory and the system will use it to render this special document first.

Related articles

How can I design a dedicated display template for the article list in AnQi CMS?

In AnQi CMS, designing a dedicated display template for the article list is a key step to creating a unique website style and optimizing the user experience.AnQi CMS provides us with a great degree of freedom with its flexible content model and powerful template engine (similar to Django syntax), allowing us to present diverse article lists based on different content types, marketing objectives, or user needs.The website's article list page is like a showcase of content, how to arrange and highlight the key points directly affects visitors' browsing interest and conversion effect.A well-designed list template

2025-11-08

How to customize the content display layout of the Anqi CMS homepage?

Your website's homepage is the first impression for visitors, as well as the showcase of the brand image and core content.How to make this "facade" both aesthetically pleasing and efficient in conveying information is a concern for every website operator.AnQiCMS (AnQiCMS) as a content management system that focuses on customization and flexibility, provides us with a very convenient way to freely create a dedicated homepage layout.

2025-11-08

How to ensure that the website content of AnQi CMS adapts to display on different devices (PC, mobile)?

One of the most painful problems we face in running websites in this multi-screen era is how to make the content of the website display effectively on different devices.Users may browse using a PC, smartphone, or tablet. If the content does not adapt to display, the user experience will be greatly reduced.AnQiCMS (AnQiCMS) provides a very mature and flexible solution in this aspect, aiming to ensure that your website content looks pleasing on any device.### AnQiCMS' Various Content Adaptation Modes AnQiCMS understands that different websites have different needs

2025-11-08

How does AnQi CMS display the prompt information when the website is closed?

During the operation of the website, we often encounter situations where we need to maintain, upgrade the website, or temporarily close the website for some special reasons.How can you inform the visitor in a friendly manner about the current status of the website, to avoid them seeing a chaotic or error page, which is particularly important.AnQiCMS (AnQiCMS) fully considers this requirement, built-in convenient and flexible shutdown prompt function, allowing you to easily deal with such scenarios. ### Flexible website status configuration, easily enable shutdown mode The shutdown function of Anqi CMS is very intuitive to configure. You just need to log in to the website backend

2025-11-08

How can you implement a unique display style for content under a specific category in AnQi CMS?

In website operation, we often encounter such needs: a particular content category needs a unique display style to highlight the importance, uniqueness, or brand character of its content.For example, your 'news center' may require a concise list layout, while 'selected cases' may require a more visually striking grid layout or slideshow display.AnQiCMS provides powerful template customization capabilities, making it intuitive and efficient to achieve this goal.Why do you need to customize the display style for a specific category?A unified website style is indeed important

2025-11-08

How to utilize the multi-site feature of Anqi CMS to achieve unified or differentiated display of content between different sites?

The multi-site feature of AnQi CMS is an extremely powerful feature, which provides unprecedented flexibility for website operators, whether it is managing multiple independent brand websites or building a content-sharing matrix, they can handle it with ease.The core of this feature lies in the fact that it allows you to efficiently manage and display multiple independently operated websites under a single secure CMS system, and cleverly balances content differentiation and unity.### Understanding the multi-site capability of AnQi CMS Firstly, we need to clarify the operation mode of the multi-site function of AnQi CMS

2025-11-08

How to count the frequency of a keyword in a string in the AnQiCMS template?

In content operation, we often need to process and analyze text.This may involve checking keyword density to optimize search engine rankings, or it may just be to understand the frequency of a specific word appearing in the content in order to better assess the focus of the content.AnQiCMS (AnQiCMS) boasts its high efficiency and customizable features, providing users with powerful content management capabilities, and its flexible template system makes it easy for us to handle various content display needs.Today, let's talk about a very practical feature: how to count the number of times a keyword appears in a string in a template

2025-11-08

How to calculate the total number of occurrences of a specific value in an array in AnQiCMS?

In website operation, we often need to handle various data, one of the common needs is to count the number of times a specific value appears in a data set.For example, you may want to know how many times a keyword appears in an article, or how many colors of a product are marked as 'hot'.For users of AnQiCMS, the system's powerful template engine provides a very convenient tool to complete this task.The AnQi CMS template engine is powerful and flexible, it comes with a variety of filters (Filters)

2025-11-08