As an experienced CMS website operation personnel in the security industry, I am very familiar with all kinds of needs for content publishing and optimization, among which the flexibility of content display is crucial for attracting and retaining users.The AnQi CMS provides strong support in this aspect, allowing us to specify independent templates for individual documents, thus achieving highly customized content presentation.

How to specify an independent template for a single document in AnQi CMS?

In AnQi CMS, specifying an independent template for a single document or page is a very practical feature. It allows us to create unique page layouts and styles, free from the limitations of general templates, based on the specific display needs of the content.The core of this operation lies in accurately specifying the template file and making the corresponding settings in the background.

The template system of AnQi CMS is based on syntax similar to Django, and the template files are usually suffixed with.html, and stored in your template design package directory/template/您的模板包名/in the bracket.The system will automatically match templates based on the URL structure or categories, and the default settings of the model.However, when you need to provide a dedicated display method for a specific document or single page, you can override these default behaviors by manually specifying a template file.

The operation of specifying an independent template for a single document or single page is usually divided into the following steps:

Prepare your custom template file

Firstly, you need to create or upload your custom template file in the current template design package you are using. For example, if you want to create a special download page for an important article, you can design one nameddownload.htmlThe template file. Or perhaps, you want to design a unique layout for the 'About Us' single-page? You can create one.about_us.htmltemplate.

These custom template files need to be in the same root directory as the other template files in your template package, or in a custom subdirectory you create (for examplepage/about_us.html)。It is important that the system be able to find this file.When designing custom templates, you can introduce common header, footer code snippets as needed, and use the various tags provided by the Anqi CMS to call document content, system information, and other data.

Configure in the background

After completing the creation and upload of the custom template file, you can log in to the AnQi CMS backend and specify the use of this template for a specific document or single page.

Fora single documentWhile, please go to the "Content ManagementFind the document you want to apply a custom template to, click its 'Edit' button to enter the editing interface.At the bottom of the document editing interface, there is usually a collapsible area called "Other Parameters".Expand this area, and you will find an input box named “Document Template”.download.htmlThe system will search and load the template based on the name you enter.

Forsingle pageIn terms of, the operational process is similar to the document.Please go to the "Page Resources" section in the background and click "Page ManagementFind the single page where you want to apply a custom template, and click the "Edit" button.In the 'Other Parameters' area of the single-page editing interface, find the input box for 'Single Page Template'.about_us.html.

After filling in the template name, please make sure to click the save button to make your changes take effect.At this moment, when the user accesses this specific document or single page, the Aqy CMS will no longer use the default template of its belonging model or category, but will load the custom template file you specified.

This feature grants website operators great flexibility, allowing them to create unique display effects for important content. Whether it is to highlight marketing information, provide a personalized user experience, or meet specific SEO layout requirements, it can be easily achieved in this way.


Frequently Asked Questions

What will happen if the specified standalone template file does not exist?If you specify a non-existent template file name for a document or a single page in the background, when the user tries to access the page, the page will fail to load normally, and may display an error message or a blank page.The AnQi CMS will prompt an error message indicating that the template file cannot be found.Therefore, before filling in the template name in the background, make sure that your custom template file has been uploaded and exists in the template design package you are currently using.

Can I specify different standalone templates for different documents under the same content model?Yes, absolutely.The purpose of specifying an independent template for a single document is exactly to meet this personalized demand.You can specify different custom template files for different documents under the same content model or even the same category.This allows you to design the most suitable display layout and features for each piece of content based on its characteristics and importance, thereby enhancing the attractiveness and user experience of the content.

Does this feature also apply to single-page applications?Yes, this feature also applies to single-page.The 'Page Management' module of AnQi CMS provides a similar 'Single Page Template' field. You can specify an independent template file for any single page by following the same operation steps as the document.For example, the "Contact Us