EnglishQiCMS: Create a dedicated display template for every article of yours
In our daily website operations, the diversity of content presentation is the key to improving user experience, enhancing brand image, and optimizing SEO effects.Different types of articles often require different layouts and features, such as a deep technical analysis article may need a more focused reading interface, while a product introduction page requires richer image displays and purchase buttons.So, can AnQiCMS (AnQiCMS) meet the need for setting independent display templates for different articles?
I can explicitly tell you that Anqi CMS not only can do it, but also provides very flexible and convenient operation methods, allowing you to assign unique visual and functional experiences to articles, categories, and even independent pages according to actual content needs.
Flexible and versatile, the core capability of custom template.
AutoCMS is able to achieve this thanks to its highly customizable design philosophy and deep support for template engines.The system allows you to upload and manage multiple sets of templates, and you can specify different HTML files as display templates for specific content elements—whether it's a single article, a list of articles in a category, or an independent static page.This means that you are no longer limited by the overall theme of the website, and can create a dedicated stage for each unique story or product.
How to set independent display templates for different content?
In the AnQi CMS, the operation is much more intuitive than you imagine.
English template for a single article
When you edit a specific article in the background, you will find a collapsible area named 'Other Parameters.' Expand this area, and you will see a field named 'Document Template.'
If you have an article specifically for providing software downloads, you may want its layout to be different from that of a regular news article, such as including a prominent download button and more technical parameters. At this time, when editing this specific article in the background, you can enter the filename of the template you have designed in advance under the 'Other Parameters' section of the 'Document Template' field.download.html。Only if thisdownload.htmlThe file exists in the template package you are currently using, and Anqi CMS will automatically call this exclusive template to render the content when the user visits this downloaded article.
To customize templates in bulk for the entire category
The template customization capability of AnQi CMS is not limited to single articles, but can also act on the entire category.This is very useful when you need to unify the display style of certain types of content (such as "company news
When editing an article category, you can also find two fields related to the template in the "Other Parameters" area: "Category Template" and "Document Template."
- “Category Template”:If you want the list page of articles in this category to have a unique appearance, such as making the list page of "Company News" distinctly different from the list page of "Product Display
article/news_list.htmlSo, all users visiting the list page of this category will see the layout rendered by thisnews_list.htmltemplate. - "Document Template":Furthermore, if you want certain categories toall articlesThe default template is used for all articles (unless a more specific template is set for the article separately), and the Aike CMS also provides a "Document Template
product/detail.htmlThen all product articles under this category, unless separately specified, will useproduct/detail.htmlto display, ensuring a unified style of the product page. - Template Inheritance:When setting the category template, there is also an option for 'Whether to apply to subcategories'.Tick this option, and the template style you set for the current category will automatically inherit to all its subcategories, saving you the trouble of repetitive settings.
individualized template for independent pages
For independent single pages like "About Us" and "Contact Informationpage/about_us.htmlSuch template path. In this way, your "About Us" page can have a unique display style, distinguishing it from article and product pages.
More intelligent template application: Naming conventions
In addition to explicitly selecting template files in the background, Anqi CMS also supports a more intelligent and automated template application method——by following specific naming conventions.This means that if you name your template files according to the system's preset rules, the system can automatically recognize and apply them without you having to specify them manually in the background.
For example:
- Document details:You can create a name for
{模型table}/{文档ID}.htmltemplate, for example:article/10.htmlIt will be automatically applied to the article with ID 10. - Category list:Create
{模型table}/list-{分类ID}.htmlfor examplearticle/list-5.html,English will be applied automatically to the article category list with ID 5. - Single page:Create
page/{单页面ID}.htmlorpage/{自定义URL别名}.htmlfor examplepage/about.html,English will be applied automatically to the single page with alias 'about'.
This naming convention provides great convenience for those websites that have a large amount of content or specific content management needs, making the maintenance and expansion of templates more efficient.
Why is this flexibility important?
This template customization feature brings many benefits:
- Enhance user experience:Provide the most suitable reading or browsing interface based on the content type, making it easier for visitors to find the information they need and stay longer.
- Strengthen brand consistency and differentiation:The core content page can maintain brand consistency, while special event or thematic pages can break away from the framework to create a unique visual effect.
- Optimize SEO:The customized template can better integrate SEO elements such as structured data, specific content layout, which helps search engines better understand and index your content.
- Implement specific functions:For example, integrating a specific download counter for the download page, adding an evaluation module to the product page, etc., all of these can be easily achieved through exclusive templates.
This template mechanism of Anqi CMS undoubtedly provides us with powerful control over content display.Whether it is the personalized presentation of every article down to the detail or the batch style definition of the entire content category, it can handle it with ease, making your website content come alive.
Common Questions (FAQ)
1. I have set a default document template under a certain category, but I have also specified another document template for a specific article within that category. Which template will take effect?
The template priority of Anqi CMS follows the principle of 'the most specific first'.If you have set a document template specifically for a particular article, that article will use the template you have specified for it separately.Only when the article does not have a separate template set, will it inherit the default document template set in its category.This design ensures fine-grained control of content.
2. I have specified a custom template filename for an article or category, but it displays an error when accessed on the front end. What could be the reason for this?
The most likely reason for this situation is that the template file you specified does not exist in the template package you are currently using, or the path is incorrect. The Anqi CMS willtemplateSearch for the specified file in the current template folder under the directory.Please carefully check that the name of the template file is spelled correctly, including the case, and that it indeed exists in the correct subdirectory.If the system cannot find the specified template file, it cannot render the page, resulting in an error.
3. Does the Secure CMS support setting different templates for mobile and PC articles?
Yes, Anqi CMS fully supports multi-terminal adaptation. On the template design level, you can create a directory namedmobileThe subdirectory, and place the mobile dedicated template files in it, the directory structure is consistent with the PC template.Then, you can select the template mode of 'Computer + Phone' in the 'Global Feature Settings' on the backend, and you can configure an independent mobile access address.