Where should the AnQiCMS single-page custom template files be stored?

Calendar 👁️ 63

In the daily operation of AnQiCMS, we often need to customize the web pages of the site to meet specific design or functional requirements.A single page, such as "About Us", "Contact Us", etc., often carries the unique brand information of a company, and therefore, configuring a custom template is a common need for website operators.Where should these single-page template files, carrying creativity and customization, be stored in the Anqi CMS directory?Today, let's delve deeply into this issue.

The place where the single-page custom template files of AnQi CMS belong

Firstly, we need to clarify the 'home' of all template files in AnQi CMS: they are stored uniformly in the root directory of the project./templateIn the folder. This/templateThe catalog, which is a collection of all template themes. When you select and enable a template theme, AnQi CMS will look for the required template files in the corresponding subdirectory of that theme.For example, if your website is currently using a template theme named "default", then the actual template file will be in/template/default/Searched and used in the directory.

For a single page, Anqi CMS has a set of conventional directory structures. Within any template theme, the single page template files are usually placed in a directory namedpage/in the subdirectory. This means that if you are currently using the "default" theme, then the default path for the single-page template will be/template/default/page/.

in thispage/Under the directory, AnQi CMS will recognize some default template files. For example, a general single-page detail template might bedetail.html, while for a single-page with a specific ID, it might usepage-{单页ID}.htmlSuch naming format.

However, the strength of Anqi CMS lies in its high flexibility and customizability. If you want to design a completely unique template for a specific single page (such as "About Us") without using the commondetail.htmlOr what should you do based on the default template by ID? The answer is: you can customize it completely!

You can find the directory of the currently enabled template theme under.page/In a subdirectory, create a new HTML file and give it a descriptive name, such asabout.html. So, its complete path might be/template/default/page/about.html.

After creating the template file, what you need to do is go to the editing interface of this single page on the Anqi CMS backend.In the page settings options, there is usually a field for 'Single Page Template'.Here, you just need to fill in the filename of the custom template you just created, that isabout.html. After saving the settings, this 'About Us' page will use the meticulously designedabout.htmltemplate to render.

This design concept not only makes the management structure of template files clear, but also greatly enhances the freedom of content operation. Whether adopting a folder organization mode or a flattened file organization mode, the core principle is to concentrate related template files of a single page.page/Under the directory, and implement the flexible application of templates through simple configuration on the back end.

Summarize the key points:

  • The template root directory of Anqi CMS is/template.
  • Each independent template theme will be in/templateto have its own folder (such as/template/default/)
  • A single-page template file should be placed in the directory of the currently enabled theme.page/In the subdirectory.
  • You can create any name HTML file (such asabout.htmlatpage/as a custom template in the directory.
  • In the background single-page editing interface, by specifying the filename through the 'Single Page Template' field, you can apply the custom template to a specific single page.

In this way, even those without a strong technical background can easily implement personalized website layout and content presentation, making each single page exude a unique brand charm.


Frequently Asked Questions (FAQ)

Q1: If I place the custom single-page template file in the wrong directory, what problems will the website encounter? A1:If you place the custom template file in the wrong directory or the template file name filled in the background does not match the actual path, Anqi CMS will not be able to find and load the template.This usually leads to page display errors, such as returning 404 errors, blank pages, or reverting to using the system's default universal single-page template (if it exists and is configured correctly).Therefore, be sure to ensure that the template file is located in/template/你的主题目录/page/below, and the name specified in the background is accurate without any errors.

Q2: Can I use/page/Do you want to create a subdirectory under the catalog to further organize my custom single-page template? For example/page/company/about.html? A2:According to the design conventions of Anqi CMS, the backend should fill in the "single page template" field with a relativepage/file name of the directory. The custom case mentioned in the document ispage/about.htmldirectly inpage/Create a file in the directory. Although theoretically some template engines may support deeper paths, it is recommended to directly place the custom template files in order to ensure compatibility and avoid unnecessary troubles.page/Under the directory, make sure the filename is unique. If a more complex organization structure is indeed needed, it is recommended to perform a small-scale test first to confirm that the system can identify it correctly.

Q3: What are the naming restrictions for the filename of a custom single-page template? A3:It is recommended to follow the standard file naming conventions, using letters, numbers, underscores, or hyphens, and ending with.htmlAs a file extension. Avoid using Chinese, special symbols, or spaces to prevent compatibility issues in different operating systems or server environments.A clear, concise, and meaningful filename (such ascontact-us.html/service-intro.htmlIt not only facilitates management, but also conforms to the practice of development and operations.

Related articles

How can you determine which category list template file is being used on the current page?

As an experienced website operations expert, I know how important it is to understand the underlying logic of the page when managing the content system.Especially when it comes to website customization, feature expansion, or daily maintenance, quickly locating the template file in use can greatly improve efficiency.Today, let's delve into how to accurately determine which category list template file is being used on the current page in AnQiCMS (AnQiCMS).

2025-11-06

What are the recommended naming rules for the template file when customizing the document template?

AnQi CMS is an enterprise-level content management system developed with Go language as the core, which provides efficient and stable content management services while also giving users high levels of customization, especially in template design.When we want a web page to have a unique and stylish design, a custom document template becomes an indispensable tool.However, how to name these template files in a standardized manner so that the system can be more intelligent and efficient in identifying and applying them is a concern for many operators.Today, let's delve into the recommended naming rules of Anqi CMS when customizing document templates

2025-11-06

Where is the default storage location for the executable files of the AnQiCMS project?

AnQi CMS is an efficient and customizable enterprise-level content management system, with its core being a lightweight and powerful executable file.For any website operator, it is crucial to know the location of this 'heart', as it not only concerns daily maintenance and management, but also affects the stable operation and fault troubleshooting of the system.Where is the executable file of the project carrying all the functions of AnQi CMS usually stored?Let's uncover this mystery.

2025-11-06

What is the usual access path (URL) for the AnQiCMS backend? Can it be customized?

As an experienced website operations expert, I am well aware of the importance of the security and convenience of the background management entry for website operations.Understanding the backend access path settings and customization capabilities of AnQiCMS, an efficient and secure content management system, is an indispensable part of our daily work.Today, let us delve into the mysteries of the AnQiCMS backend access path together.

2025-11-06

How should mobile template files be organized and stored when making a mobile phone template?

As an experienced website operations expert, I know how important it is to have a good mobile website experience in today's mobile internet age.Users are accustomed to browsing content on various mobile devices. If your website does not display well on mobile phones, it will not only lose users but will also affect the search engine rankings.AnQiCMS (AnQiCMS) is an efficient and customizable content management system that also provides clear and flexible solutions for mobile template design.Today, let's delve into it in detail when making mobile templates with Anqi CMS

2025-11-06

What is the actual file path represented by variables like `{filename}` or `{catname}` in static rules?

## Unveiling the 'mysterious code' in AnQi CMS static rules: the truth about `{filename}` and `{catname}` As an experienced website operations expert, I am well aware that a friendly and efficient URL structure is crucial for a website's search engine optimization (SEO) and user experience.AnQiCMS (AnQiCMS) provides strong support in this aspect, especially its flexible static rule management function.However, when configuring these rules

2025-11-06

How to view the root directory path of the AnQiCMS container in Docker environment?

When deploying AnQiCMS with Docker, you may sometimes encounter situations where you need to explore its internal file structure, such as locating the actual root directory path of the website.This is very important for troubleshooting file access issues, performing manual file modifications, or deeply understanding the operation mechanism of AnQiCMS within the container.As a website operations expert, I fully understand the value of this exploration. Next, let's unveil the 'mysterious veil' of the root directory of the AnQiCMS container website.

2025-11-06

When deploying AnQiCMS with Baota panel, which folder should the Nginx running directory be configured to?

As an experienced website operation expert, I am happy to give you a detailed explanation of the correct configuration method of the Nginx running directory when deploying AnQiCMS with Baota panel, and to analyze the principles behind it in depth to ensure that you not only know the what, but also the why. --- ### When deploying AnQiCMS with Baota panel, which directory should the Nginx running directory be configured to?Deep analysis and practice Deploying AnQiCMS and such Go language applications using Baota panel

2025-11-06