English CMS (EnglishCMS) as an efficient and customizable content management system, its version iteration has always been committed to providing website operators with more flexible and powerful content display capabilities.In AnQiCMS v2.0.0-alpha7 version, a highly anticipated feature has been 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.
Flexible application of custom category templates
The category template is an important part of the AnQiCMS content system, which determines the list display format 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 categories.However, after v2.0.0-alpha7, we can specify a custom template for each specific category under the 'Content Management' module's 'Document Category' 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 concise, quick-browsing list template for the "News Center", and a more advanced template focusing on content summary and highlighted download buttons for the "Industry Report". On the category editing page, simply fill in the template file name you have prepared in the "Category Template" field (for examplenews_list.htmlorreport_archive.htmlMake sure the file exists in your current template package directory.If you need to apply this template to all subcategories under this category, just check '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 custom article and product detail templates
The value of custom templates is even more evident for the core content of the website - articles and products.Every major release, every flagship product, may need a unique detail page to attract users' attention and convey core values.In AnQiCMS v2.0.0-alpha7, we have added the 'Document Template' option under 'Content Management', whether we are editing articles or products, their detail pages.
For example, for a deep industry analysis article, you may want to have a sidebar navigation to facilitate users jumping to different chapters; for a newly listed product, it may require a dedicated page containing large-sized image sliders, detailed specification comparison tables, and user review modules. All we need to do is fill in the corresponding template filename 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 details page of the article or product.In addition, if a "Document Template" is specified for a category in the classification settings, then all articles or products under that category will also use the document template set by the category by default if no separate template is specified, which provides great convenience for us to control the style of content in bulk.
Customized personal single page template
In addition to categories and specific content, single-page sections such as "About Us", "Contact Information", and "Terms of Service" on the website also often carry important brand information or user guidance.By customizing page templates, we can revitalize these seemingly ordinary pages and better serve the overall operational 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 company history, and a display of corporate culture; while the "Contact Us" page may require embedded online maps, contact numbers for multiple departments, and even a customized feedback form. By entering something like in the "Single Page Template" field,about_us_full.htmlorcontact_map.htmlSuch template name, each single page can have a dedicated appearance that perfectly matches its content and functionality.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 in the application of custom templates provides two flexible methods.An English translation of auto is English. One is to explicitly specify the template file name in the content management background, and the other is to achieve automatic matching of templates by following specific naming conventions.
AnQiCMS supports for article and product detail pages{模型table}/{文档id}.htmlnaming format, for examplearticle/10.htmlWill be automatically applied to the article with ID 10. For the list page, it can be{模型table}/list-{分类id}.htmlfor exampleproduct/list-5.htmlWill be automatically applied to the product category list with ID 5. And the single page supportspage/{单页面id}.htmlThe naming convention. 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 any additional configuration in the background.This automatic matching mechanism can greatly improve efficiency for batch content or standardized pages, reducing the complexity of manual configuration.
value and precautions in actual operation
Custom template function has brought profound value to the website operation of AnQiCMS.In SEO, it allows us to design a structure that is more in line with the search engine crawling habits for different content types, improving page quality and user experience, and indirectly promoting 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 the perspective of content marketing, this allows us to present content more flexibly, highlight key points, and convert potential customers.
When applying these custom templates, be sure to use UTF-8 encoding for the template files and ensure they are placed in/template/您的模板目录/English.At the same time, when specifying the template file name in the background, it is necessary to ensure the accuracy of the file path and name, otherwise it may cause the page to fail to display normally.archiveDetail,categoryDetail,pageDetailThe translation from auto to English is not provided as it's not a language-specific word or phrase. Assuming the translation of the content within 'value' field, the translation might be: "Etc.), which can help us efficiently call the required data in custom templates and build functional and visually outstanding web pages."
}]
Frequently Asked Questions
Q1:Custom template whether affect the website performance or SEO performance?
A1:AnQiCMS was designed with performance and SEO optimization in mind from the very beginning. It provides a solid foundation with the high concurrency features of the Go language.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 makes full use of the built-in static cache, TDK configuration, and other SEO tools of AnQiCMS, it can actually enhance user experience and search engine friendliness, which is a positive promotion for SEO.
Q2: I have set both the "Document Template" for the category of a certain article and the "Document Template" for the article itself. Which template will take precedence?
A2:AnQiCMS 的模板优先级遵循更具体、更精确的原则。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 that you can first set a general template for the entire category, and then design independently for a few special articles within it, 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 background content editing page (category, article, product or page management), accurately fill in your template filename in the corresponding "template" field, ensuring it matches the actual filename (including the extension).html)。If using naming conventions for automatic matching, it is necessary to ensure that the filename strictly conforms to{模型table}/{文档id}.html/{模型table}/list-{分类id}.htmlorpage/{单页面id}.htmlrules.