In the Safe CMS, all template files are stored in the root directory of the system./templatefolder. Each independent website template will be in./templateThe directory has its own exclusive directory, for example/template/defaultor/template/my_theme. This template directory is the foundation that carries all design files, including HTML templates, styles, scripts, and images, etc.

AutoCMS to simplify the template configuration process, supports some default template file naming rules.This means that as long as your template files exist with these predefined names, the system can automatically recognize and apply them without any additional manual settings in the background.This mechanism greatly enhances the convenience of template deployment and updates.

For the default homepage template of the website, Anqi CMS provides two main naming conventions to adapt to different template file organization modes. These modes determine how you layout and manage files within the theme.

一种是采用Folder organization mode。在这种模式下,为了更好地组织模板文件,首页模板被放置在一个名为index的子目录中,并命名为index.html。因此,其完整路径将是<您的模板目录>/index/index.htmlThis hierarchical structure helps maintain clarity in the organization of a large number of template files.

Another option is to useFlat file organization modeIn this mode, in order to pursue the ultimate simplicity and directness, the homepage template file is directly namedindex.html, and placed at the root of your template directory. Its complete path is<您的模板目录>/index.htmlThis pattern is suitable for users with relatively simple template file structures or who prefer flat management.

Whether it is in any mode, the safe CMS can intelligently identify and prioritize the use of these naming specification homepage template files.This means that when accessing the homepage of the website, the system will first look for these predefined name templates and render them as the entry page of the website.Understanding and following these naming rules is the foundation to ensure that your security CMS website runs smoothly and effectively displays content.


Common Questions (FAQ)

Q1: If there are multiple template directoriesindex.htmlandindex/index.htmlWhat file will AnQi CMS use as the home page template first?

A1: In this case, the security CMS will usually follow a certain priority to select the home page template. According to system design, the flat modeindex.htmlFiles usually have a higher priority.However, to avoid potential conflicts and confusion, we recommend that you choose only one organizational pattern within the same template theme to define your homepage template, ensuring its uniqueness.

Q2: Can I customize the filename of the home page template without usingindex.htmlorindex/index.html?

A2: The default behavior of AnQi CMS is to automatically recognize the homepage template with preset names.If you need to use a custom homepage template, you usually need to manually specify it in the template configuration or website settings.The system provides flexible setting options, allowing you to specify custom template files for specific pages or content types.

Q3: Do these naming rules for home page templates also apply to mobile templates?

A3: Yes, these naming rules also apply to mobile templates. If your CMS theme supports separate mobile templates, these templates will be stored in the main template directory.mobileIn the subdirectory. InmobileUnder the directory, you can organize the folders in the same pattern asmobile/index/index.html) or flattened mode (mobile/index.htmlTo create your mobile home page template file, the system will automatically select the appropriate template based on the type of device being accessed.