With different content models, the next step is how to present them in their unique 'appearance'.AnQiCMS uses a set of intuitive and layered template management mechanisms to solve this problem.
Firstly, the system provides default template file conventions. For example, for articles or product detail pages under different content models, there is usually a similar{模型table}/detail.htmlThe default template. For a single page, there ispage/detail.htmlAs the default display. This convention allows us to differentiate different types of content with a basic distinction without any special settings.
However, the actual operation requirements are often more refined. The Anqi CMS fully considers this point and provides deeper customization capabilities:
Specify an independent template for individual contentImagine you have a particularly important article or a product that requires special promotion, and you want it to have a unique showcase page.In the Auto CMS, this is very simple.When editing specific articles (or products), you will find an option named "Document Template" in the "Other Parameters" section.
special-article.htmlThe template file name. When rendering this content, the system will prioritize using this specified template over the default template of the model or category.Specify an independent template for content categories.Sometimes, we may want all articles under a specific category (such as "Industry NewsWhen creating or editing a category, Safe CMS provides an option for a "category template".
news-list.html)。Furthermore, you can set a "document template" so that all articles (or products) in this category use the specified template (for example,news-detail.html)。It is worth mentioning that this "document template" also allows you to choose whether to apply it to the sub-category, which means you can let the entire category hierarchy follow this design, greatly improving management efficiency.Specify an independent template for a single page: For pages such as "About Us" and "Contact Information", the content structure is relatively fixed, but the design requirements may vary greatly.In the "Page Management
about-us.htmlSuch a template file, assigns a unique visual style to each single page, making information communication more targeted.
Common Questions (FAQ)
Q1: What will happen if I specify a template for some content, but the template file does not exist?A1:If the specified template file does not exist, the system will not be able to find the corresponding rendering logic, which usually leads to the page not displaying normally and even displaying error messages.Therefore, make sure that the template file has been uploaded and placed in the correct template directory before specifying a custom template.
Q2:After setting 'Apply to child categories' in the classification template, can the content under child categories still be customized?
Q3:Can I use the same template file to display detail pages of different content models (such as articles and products)?