AnQiCMS (AnQiCMS) is an efficient and customizable content management system, and its version iteration has always been committed to providing website operators with more flexible and powerful content display capabilities.In the AnQiCMS v2.0.0-alpha7 version, a highly anticipated feature was introduced: custom categories, articles, products, and page templates.This update greatly broadens the freedom of content presentation, allowing the website to create more personalized and professional page layouts according to specific business needs.

Apply flexible custom category template

The category template is an important part of the AnQiCMS content system, it determines the list display form of articles or products under a certain category.In the past, we may have been limited by a general list template, making it difficult to design differentiation for different types of categorization.However, after v2.0.0-alpha7, we can specify a custom template for each specific category under the "Content Management" module's "Document Classification" settings.

This means, for example, if your website has a "News Center" category and an "Industry Report" category, although they both belong to the "Article Model", you can now design a simple, quick-browsing list template for the "News Center", and a more advanced template that focuses on content summaries and highlighted download buttons for the "Industry Report". On the category editing page, simply fill in the name of the template file you have prepared (for examplenews_list.htmlorreport_archive.html),and ensure that the file exists in your current template package directory.If you need all subcategories under this category to follow this template, just check the box for 'Apply to subcategories'.This refined classification template application not only optimizes the browsing experience of users under specific content types, but also provides more possibilities for us to carry out SEO strategy layout for different categories.

Create exclusive article and product detail templates

The value of custom templates is even more evident for the core content of a website - articles and products.Every major release, every flagship product, may need a unique detail page to attract users' attention and convey core value.In AnQiCMS v2.0.0-alpha7, we can add the 'Document Template' option under 'Content Management', whether editing articles or products, the detail page has added this option.

For example, for an in-depth industry analysis article, you may want to have a sidebar navigation to easily jump to different chapters; for a newly launched product, you may need a dedicated page containing large-size image slideshows, detailed parameter comparison tables, and user review modules. We just need to fill in the corresponding template file name in the "Document Template" field on the document or product editing page (for example,deep_analysis.htmlornew_product_showcase.html)。The system will prioritize using this specified template to render the article or product details page.Moreover, if a document template is specified for a category in the category settings, then all articles or products under that category will also default to the document template set by the category if no separate template is specified, which provides great convenience for bulk control of content style.

Custom personalized single page template

In addition to categories and specific content, single pages such as "About Us", "Contact Information", and "Terms of Service" on the website often carry important brand information or user guidance.By customizing the page template, we can bring new life to these seemingly ordinary pages, serving better the overall operation goals of the website.In the 'Page Resources' module under 'Page Management', each single page editing interface provides the 'Single Page Template' setting item.

For example, your "About Us" page may need a complex layout that integrates team introductions, a timeline of development, and a display of corporate culture; while the "Contact Us" page may need to embed an online map, multiple department contact numbers, and even a customized feedback form. By entering such as in the "Single Page Template" field,about_us_full.htmlorcontact_map.htmlSuch a template name, each single page can have a dedicated appearance that perfectly matches its content and functions.This not only enhances the visual appeal of the page, but also effectively guides users and strengthens brand trust.

Template file naming conventions and automatic matching mechanism

AnQiCMS provides two flexible ways to apply custom templates.One is to explicitly specify the template file name in the content management background, and the other is to automatically match the template by following specific naming conventions.

AnQiCMS supports for article and product detail pages{模型table}/{文档id}.htmlnaming format, for examplearticle/10.htmlIt will be automatically applied to the article with ID 10. For list pages, it can be{模型table}/list-{分类id}.htmlFor exampleproduct/list-5.htmlIt will be automatically applied to the product category list with ID 5. And it supports single pages.page/{单页面id}.htmlThe naming method. For example, if your "About Us" page alias isabout-usand its ID is 1, then create apage/about-us.htmlorpage/1.htmlThe template file, the system can automatically identify and apply it, without additional backend configuration.This automatic matching mechanism can greatly improve efficiency for batch content or standardized pages, reducing the麻烦 of manual configuration.

value and注意事项 in actual operation

The custom template function has brought profound value to the website operation of AnQiCMS.In SEO, it allows us to design structures that are more in line with search engine crawling habits for different content types, improve page quality and user experience, and indirectly promote search rankings.In terms of user experience, personalized page layout can better meet users' browsing habits, improve the readability and attractiveness of content, and reduce the bounce rate.From a content marketing perspective, this allows us to present content more flexibly, highlight key points, and convert potential customers.

When applying these custom templates, be sure to pay attention to the fact that the template files should be unified in using UTF-8 encoding and ensure that they are placed in/template/您的模板目录/Below. Also, when specifying the template filename in the background, ensure the accuracy of the file path and name, otherwise the page may not display normally.Understand and make good use of AnQiCMS template tags (such asarchiveDetail,categoryDetail,pageDetailIt can help us efficiently call the required data in custom templates, building functional and visually outstanding web pages.

Frequently Asked Questions

Q1: Does custom template affect website performance or SEO?

A1: AnQiCMS considered performance and SEO optimization from the beginning of its design, and its high-concurrency characteristics based on the Go language provide a good foundation.The custom template itself does not directly affect performance, the key is the quality and optimization of the template code.If the template is well designed, the code is concise and efficient, and fully utilizes the built-in static cache, TDK configuration, and other SEO tools of AnQiCMS, it can even improve user experience and search engine friendliness, which is a positive promotion for SEO performance.

Q2: I have set both the "document template" of the category to which an article belongs and the "document template" of the article itself. Which template will take precedence?

A2: AnQiCMS follows a more specific, precise template priority principle.In this case, the document template of the article itself will have the highest priority and will override the document template set in the category.This means you can first set a general template for the entire category, and then design independently for some special articles, achieving flexible local customization.

Q3: How can I ensure that my custom template file can be recognized and applied by AnQiCMS?

A3: Firstly, you need to place the custom template file in the correct location under the currently enabled template theme directory, for example/template/您的模板目录/article/my_special_article.html. Next, in the content editing page (category, article, product, or page management) in the corresponding "template" field, accurately fill in your template filename to ensure it matches the actual filename (including the suffix).html)。If using naming conventions for automatic matching, then the filenames must strictly follow{模型table}/{文档id}.html/{模型table}/list-{分类id}.htmlorpage/{单页面id}.htmlrules.