In website operation, we often encounter such needs: different types of content or pages with different themes need to be presented in a unique way to better attract visitors, convey information, and even enhance the brand image.This involves the customization ability of templates. AnQiCMS (AnQiCMS) indeed provides strong and flexible support in this aspect, allowing users to set custom templates for pages of different categories, thus achieving differentiated content display.

The AnQi CMS template design system aims to provide users with high customizability. It adopts a template engine syntax similar to Django, files are written in.htmlWith the suffix, they are stored uniformly in the system's/templateUnder the directory. This design concept makes it easy for users who are not familiar with the Go language to easily get started with template creation.The system not only supports various modes such as adaptive, code adaptation, and independent sites for PC and mobile phones, but more importantly, it also delegates the template control permissions to various levels of content management.

Category page fine-tuned template customization

For the website category page, Anqi CMS provides a very flexible template specification method.Imagine your website has three main categories: "News and Information", "Product Display", and "Success Cases". You may want to display "News and Information" as a list of blog articles, complete with publication dates and summaries.The product display should highlight the product images, model, and price;And a 'successful case' might need a grid layout with pictures and text.In AnQi CMS, all these can be realized.

The system will apply a common template to the category list page under each content model (such as 'Article Model' or 'Product Model'), typically{分类模型}/list.html. When you want a specific category to have a unique visual presentation, you can find the 'Category Template' option in the edit interface of that category.Here, you can enter a custom template filename, for example, if you want to specify a unique display method for the product category with ID 10, you can create a file namedproduct/list-10.htmltemplate file and apply it to the category.

Further, AnQi CMS also considers the inheritance problem of the classification hierarchy.When setting up a custom category template, you can select whether to apply it to subcategories.This means that if you have multiple subcategories under a top-level category and you want these subcategories to follow the same unique template style, just check this option and you don't have to set them one by one, which greatly improves operational efficiency.At the same time, you can also specify a "document template" for all documents under a certain category to ensure that all content articles in that category follow specific display rules.

unique customization for individual content or page

The template customization capability of AnQi CMS is not limited to the classification level, but also extends to individual content articles and independent pages.

For example, there is an extremely important product introduction article on your website, or a special event page, and you hope that it can break away from the constraints of the conventional article template to have a unique visual experience.When adding or editing a document, you will see a "Document Template" field.Here, you can specify the custom template file to be used for this document, such asdownload.html. When the system accesses this document, it will load the exclusive template you specified to render the content, rather than using the default article template of its category.

For independent pages (such as "About Us", "Contact Information", etc.), AnQi CMS also provides similar mechanisms. By default, these pages may all usepage/detail.htmlThis is a general template. But if you want a special layout for the "About Us" page, or if the "Join Us" page needs to display specific form elements, you can create a namedpage/about.htmlorpage/join-us.htmlThe custom template file. Then, when creating or editing these independent pages in the background, specify the corresponding file name in the 'Single Page Template' field.This, each independent page can have its own "face".

The value of customized differentiated templates

Why should we carefully customize differentiated templates?

Firstly, it greatlyEnhanced user experienceWhen content of different types is presented in the most suitable way for its characteristics, users can obtain information more quickly and intuitively, reduce visual fatigue, and thereby improve the usability and user satisfaction of the website.

Secondly, this helpsStrengthen brand image and visual recognition. By designing exclusive page styles for different business sections or content themes, it can more clearly convey the brand character and leave users with a deeper impression of the website content.

Again, the differentiated template forSEO optimizationIt is also very beneficial. Customized templates can better adapt to the structured data needs of specific content, optimize page loading speed, and allow for more flexible layout of keywords and internal links, thereby improving the crawling efficiency and ranking performance of search engines.

The Anqi CMS, through this fine-grained template control mechanism, gives website operators great freedom, whether they want to maintain a unified overall style of the site or pursue personalized display of local content, it can be easily achieved.This makes Anqi CMS not only a content management system, but also a powerful tool to help enterprises in content marketing and brand building.


Frequently Asked Questions (FAQ)

1. I set up a custom category template, but the page did not work. What is the reason?The most common reason is that the template filename is filled in incorrectly, or the custom template file has not been uploaded to the correct template directory. Please carefully check the template filename you entered in the category settings to ensure that it is completely consistent with the actual template filename (including the extension), and that the file is correctly placed in the template theme folder you are currently using (for exampletemplate/您的主题名/product/list-10.html)

2. How can I set up a custom article template for all articles under a specific category?You can find the 'Document Template' field on the edit page of this category. Here you can enter the custom template filename (such asdetail-special.html),It will take effect on all articles under this category and all its subcategories, unless a specific template is specified for an individual article.This is much more efficient than setting the template for each article individually.

3. Can I set different custom templates for mobile and PC?A safe CMS supports multiple template types, including 'code adaptation' and 'desktop + mobile' mode. In these modes, you can create in the template theme directorymobileThe subdirectory, and place the mobile end template files with a similar structure but different content.Such, the system will automatically load the corresponding template according to the user's visited device, thereby achieving differentiated display on the PC and mobile ends.