Do I want to use a unique display template for specific articles or categories, does AnQiCMS support this?

Calendar 👁️ 68

In website operation, we often encounter such needs: some articles or categories, due to the particularity of their content or marketing needs, we hope to give them a completely different display style from other parts of the website.This personalized display requirement is particularly important in today's increasingly rich content.So does AnQiCMS support the use of unique display templates for specific articles or categories?The answer is affirmative, and it provides powerful and flexible features to support you in achieving this goal.

Why do I need a dedicated template?

Imagine, you might have a new product launch special page, hoping to have a unique visual impact to attract users;Or a specific product series, which needs to focus more on image display rather than text description.Perhaps you would like to present an important announcement in a prominent way, while keeping other ordinary information concise.Exclusive templates can help us better focus on the key points of content, improve user experience, enhance brand image, and even greatly benefit the improvement of conversion rates.AnQiCMS fully understands these requirements and incorporates them into the core design of the system.

The flexible template customization path of AnQiCMS

AnQiCMS was designed from the beginning to provide an efficient, customizable, and scalable solution.One of its core advantages is the "flexible content model", which lays the foundation for us to achieve personalized content display.By using the various built-in functions of the system, you can easily specify unique display methods for different content types.As early as the AnQiCMS v2.0.0-alpha7 version, the system officially introduced the features of custom categories, articles, and page templates, making this personalization accessible.

Customize templates for single articles or single pages

Customizing templates for individual content is very intuitive and convenient. When you edit or publish a new article in the "Content Management" backend, you will find a field named "Document Template", which is usually located in the collapsed area of "Other Parameters".Here, you can directly enter the template filename you designed for this specific article, for example, if you designed a unique template for a download article,download.htmlTemplate, just fill in heredownload.htmlIt can. When the system renders this article, it will give priority to the exclusive template you specify.

Similarly, for the single pages under "Page Resources" (such as "About Us", "Contact Us", etc.), there will also be a similar "Single Page Template" option when editing.The operation method is consistent, you just need to enter the corresponding template file name, and your single page will have a unique layout and style.

Custom template for a specific category

If you want all the list pages under a specific category to use a specific layout, AnQiCMS also provides a convenient setting.When editing a category in the "Content Management" "Document Category", you will see an option named "Category Template".Enter the name of the template file you have designed for the category list page, for examplelist-product.htmlThen the list page of this category will use this exclusive template.

It is especially worth mentioning that this setting also has an option for whether it should be applied to subcategories.If you check this option, then the list page of all subcategories under this category will automatically use the custom template you set, which undoubtedly provides great convenience for maintaining the consistency of the style of specific content modules in a large website.

Let the articles in the category also have an exclusive template.

In addition to setting a template for the category list page, AnQiCMS also allows you to specify a default detail page template for all articles under the category level.On the editing page of 'Document Classification', in addition to 'Category Template', there is also a setting item named 'Document Template'.The template filename entered here will be used as the default detail page template for all articles in this category.This way, you don't have to set each article individually, ensuring that all detail pages under a specific category present a unified style, greatly improving management efficiency.

The placement and naming convention of template files.

Where should these custom template files be placed and what should they be named? AnQiCMS template files are stored uniformly in the system's/templatethe directory, and.htmlAs a suffix. Each independent template usually has its own subdirectory.When you specify a custom template name in the background, just make sure that the file exists in the currently enabled template directory.

For example, if the current theme directory you are using isdefaultthen your custom template file may be located/template/default/article/download.html. In the background 'Document Template' field, you just need to fill inarticle/download.htmlJust do it.

In addition, AnQiCMS also supports some default naming conventions, such as:

  • Default custom template for document details:{模型table}/{文档id}.html(For example)article/123.html)
  • Default custom template for document list:{模型table}/list-{分类id}.html(For example)article/list-45.html)
  • Default custom template for single page:page/{单页面id}.html(For example)page/6.html)

This means that even without manual setup through the backend, as long as your template file follows these conventions, the system can automatically identify and apply them, further simplifying management.

Summary

In summary, AnQiCMS provides meticulous consideration and strong support for customizing content display templates. Whether it is for a single article, an entire category, or all articles under a category, you can find the corresponding settings options.

Related articles

How to understand the template file structure of AnQiCMS and effectively manage the display layout of the website?

Manage the display layout of the website in Anqi CMS, the core lies in understanding its flexible template file structure and powerful tag system.This can not only give your website a unique visual style, but also greatly improve the efficiency of content operation and user experience. ### One, Anqi CMS template overview: the foundation for building a website Imagine that your website is a house, and the Anqi CMS template system is the design图纸 and construction tools for this house.It is based on the efficient backend of Go language, but it adopts syntax similar to the Django template engine in front-end templates

2025-11-08

What template types does AnQiCMS support to adapt to content display on different devices?

Whether website content can be seamlessly and beautifully displayed on various devices in today's multi-screen era is directly related to user experience and brand image.AnQiCMS as an enterprise-level system focusing on efficient content management, fully understands the importance of this demand, and therefore provides a flexible and diverse range of solutions in template support to ensure that your website content can be presented in a **state** on desktop computers, tablets, or mobile phones.To meet the needs from simple and efficient to highly customized, AnQiCMS meticulously designed three core website modes to handle the display of different devices

2025-11-08

How can I customize the overall interface and user experience of the AnQiCMS website?

A powerful and flexible set of tools is provided by AnQi CMS, allowing users to deeply customize the overall interface and user experience of the website, thereby creating a digital platform that is both beautiful and efficient.A customized website can not only better convey the brand image but also improve visitors' satisfaction and conversion rate through optimized user experience.This will elaborate in detail on how to achieve this goal by using the various functions of AnQiCMS.Flexible content presentation: The foundation of the interface. The website interface first presents the content.AnQiCMS provides high flexibility in content management

2025-11-08

How to use the `cut` filter to remove the `?` symbol and its subsequent parameters from the image URL path to obtain a pure path?

In website operation, the management and display of image resources are crucial.To ensure the website loads quickly, improve search engine optimization (SEO) and optimize the user experience, we often need to handle image URLs.Sometimes, an image URL may carry some parameters, such as version numbers, cropping sizes, or tracking information, which are usually followed by a question mark (`?')`Start. Although these parameters have their specific purposes, in certain display scenarios, we may wish to obtain a pure image path without any parameters.In AnQiCMS (AnQiCMS)

2025-11-08

How to use Django template engine syntax in AnQiCMS template to control the content display logic?

AnQiCMS is an efficient content management system developed based on the Go language, its template system uses a syntax similar to Django's template engine, which is undoubtedly an advantage for those familiar with web development to quickly get started and implement powerful content display logic.It allows us to flexibly control the presentation of content at the template level without writing complex backend code.To understand how to use this GoLang implemented Django template engine syntax in AnQiCMS templates to control content display logic

2025-11-08

How can you list the latest articles or products under a specified category in AnQiCMS?

Manage website content in AnQiCMS, often need to display relevant information according to different themes or sections.For example, you may want to display the latest articles under the "Company News" category in some area of the homepage, or show the latest products under the "Hot New Products" category in the sidebar of the product page.AnQiCMS provides flexible and powerful template tags, allowing you to easily implement these content call requirements.Understanding the content organization of AnQiCMS is the key to efficiently utilizing its features.The system distinguishes different types of content through the "content model", such as article models and product models

2025-11-08

What sorting and filtering options does AnQiCMS provide to control the display order of list content?

How to efficiently display and organize content in website operation directly affects the user experience and the efficiency of information transmission.For users who use AnQiCMS, the system provides various flexible sorting and filtering options to help us accurately control the display order of list content. Whether it is articles, products, or other custom content types, they can be presented to visitors in the most business-friendly way possible.The AnQi CMS has given the control of content display order to the user, which is mainly realized through a powerful template tag system and backend management settings.Through these features

2025-11-08

How to display a list of related articles based on the keywords or custom associations of an article?

In website content operation, providing users with a list of relevant articles can not only effectively extend the visitor's stay time on the website and reduce the bounce rate, but also through guiding users to discover more interesting content, optimize the internal traffic path, and have a positive impact on SEO performance.AnQiCMS (AnQiCMS) understands this need and provides flexible and powerful functions, allowing us to easily display lists of related articles based on keywords or custom associations.###

2025-11-08