AnQiCMS template system supports Django template engine syntax, is easy to learn, and most importantly, it provides three main website modes to meet the compatibility needs of different levels of devices: adaptive mode, code adaptation mode, and PC + mobile phone independent display mode.
Flexible template adaptation mode, meets various needs
1. Adaptive Mode (Responsive Design)Adaptive mode is the most common solution at present.In this mode, you only need to design a template, and AnQiCMS will automatically adjust the page layout, image size, and font elements according to the screen size and resolution of the visited device.This means that regardless of whether the user accesses your website via computer, tablet, or smartphone, they will see a well-formatted, complete information page.
The advantages of choosing the automatic mode are lower development and maintenance costs.You do not need to create a template for different devices separately, one template can handle all terminals.The template design of AnQi CMS follows standard Web technologies, combines CSS3 Media Queries and other technologies, and can intelligently reorganize and present content, ensuring good visual effects and interactive experience.This is an efficient and economic choice for small and medium-sized enterprises and self-media operators.
2. Code Adaptation ModeThe code adaptation mode is designed for users who want to provide finer control across different devices.In this mode, although the front-end may share some core styles or scripts, you can prepare different HTML structures or content snippets for PC and mobile ends.AnQiCMS will intelligently identify the user's visiting device (such as through User-Agent) and then load the corresponding template code.
The flexibility of this mode is reflected in that you can make conditional judgments (such as using template tags) within the same set of template files{% if condition %}to determine the device type) to render different content modules or layouts. Furthermore, you can also create a dedicated mobile template directory (usually/template/your_template_name/mobile/),and place the optimized template files for mobile devices in it. When the system detects that a mobile device is accessing, it will load them first.mobileThe corresponding template under the directory, thus achieving 'code level' adaptation.For example, you may want to simplify some complex interactive elements on the mobile phone or display a more concise list of articles, and the code adaptation mode can meet such needs.
3. PC+手机端独立显示模式(PC + Mobile Independent Display)For websites that have completely different user experience needs for PC and mobile, and even hope to have independent brands or content strategies, the PC+mobile independent display mode offers ultimate flexibility.In this mode, you will build two websites independently for PC and mobile.www.yourdomain.comUsed for PC end,.m.yourdomain.com用于移动端(For Mobile)
In AnQiCMS system settings, you can specify a separate domain for mobile devices.When users access the PC domain through mobile devices, AnQiCMS will automatically redirect users to the corresponding mobile domain.Both are the same.This mode allows PC and mobile ends to have completely different design styles, content layouts, functional modules, and even to carry out SEO optimization specifically, without interfering with each other.While the development and maintenance costs are relatively high, it gives the operator the greatest degree of control and customization, especially suitable for enterprises that need to provide differentiated services for different terminals.
Whether it is pursuing concise and efficient adaptation, or the need for fine-controlled code adaptation, or pursuing the ultimate differentiation of independent mode, AnQiCMS template system can provide strong support.It ensures that your website content is presented in an**attitude**on any device, bringing a smooth and pleasant browsing experience to users.
Common Questions (FAQ)
1. How to choose and switch different template adaptation modes in AnQiCMS backend?In AnQiCMS backend, you will usually find the template management options in the "Template Design" or "Global Settings" area. There is a template management option under each template directory.config.jsonfile containing atemplate_typeField, its value determines the adaptation mode of the current template (0 represents adaptive, 1 represents code adaptation, 2 represents independent display on PC and mobile). You can select and activate the template you need through the background template management interface, and the system will automatically readconfig.jsonThe configuration to apply the corresponding adaptation mode.
2. If I selected the code adaptation mode or PC+mobile independent display mode, where should the mobile template be stored?According to AnQiCMS's agreement, the template files optimized for mobile devices should be stored in the current template root directory undermobile/the subdirectory. For example, if your PC template directory is/template/default/English, then the mobile template files should be placed in/template/default/mobile/. Thismobile/directory should be consistent with the PC template directory structure, for example, the mobile home page can be/template/default/mobile/index.html.
3. How to set the mobile end address (domain) in the independent display mode on PC and mobile phone to achieve automatic redirection?To enable automatic redirection in the independent display mode on PC and mobile devices, you need to find the 'Mobile End Address' option in the 'Global Settings' of AnQiCMS backend, and enter your mobile domain name here (for example,m.yourdomain.com)。At the same time, ensure that this mobile domain has been correctly resolved to your server.When the user accesses your PC domain via a mobile device, the AnQiCMS system will automatically detect and redirect it to the mobile end address you have set.