AnQiCMS provides very flexible and powerful customization capabilities for website page layout display.Whether you are hoping to quickly build a corporate website with a unique style or need to operate multi-site content with precision, AnQiCMS allows you to have complete control over the 'skeleton' to 'flesh' of the website.

Core Concept: Comprehensive control from framework to detail

AnQiCMS template files are unified using.htmlas a suffix, and stored centrally in the root directory/templateThe folder contains. Each template package has oneconfig.jsonfile to define the name, version, author, and other basic information of the template, among which the most critical istemplate_typefield determines whether your website usesauto-adaptive/code-adaptationorPC+mobile independentDisplay mode.This means you can choose the most suitable layout strategy based on the target audience and device type./public/static/, convenient for management and maintenance.

The organization and refinement of template files: the foundation of building exclusive pages

In AnQiCMS, the organization structure of template files is very clear, and it can be adoptedFolder organization modeorFlattened file organization modeBoth of these modes are designed to help you efficiently manage and find templates.

For example, you can put all the common code segments that all pages need to inherit, such as page headers and footers.bash.htmlIn addition, you can store reusable code segments like sidebars and breadcrumb navigation.partial/Under the directory, so that it can be referenced as needed between different pages.

For common page types, AnQiCMS also presets some default template file names. As long as you create these files, the system can automatically recognize and apply them:

  • Home page: index/index.htmlorindex.html
  • Document details page: {模型table}/detail.html(For example, the article model is)article/detail.html)
  • Document list page: {模型table}/list.html
  • Single page detail page: page/detail.html
  • Search page: search/index.html
  • Error page: errors/404.htmlorerrors/500.html

It is particularly worth mentioning that AnQiCMS allows you to specify a unique template for specific content (such as a category, an article, or a single page). For example, if you want the 'About Us' single page to have a completely independent design, simply name the template file.page/about.htmlThen create a single-page template in the background and specify the use of this custom template. Similarly, the category page can also be personalized by specifying a category template in the background.{模型table}/list-{分类ID}.htmlOr specify a category template in the background to achieve a personalized layout.

If you have selected code adaptation or PC+mobile mode, the system also supports creating in/templatethe template folder under the directorymobile/Subdirectory, and copy the template structure consistent with the PC end. In this way, when the mobile device accesses, the system will automatically loadmobile/Ensure the mobile experience of the templates under the directory.

Deep Customization: Content Model and Flexible Fields

The website layout is not only static design, but also needs to be closely integrated with the content.The 'Flexible Content Model' feature of AnQiCMS is the key to deep customization.Data Structure.

For example, an 'article' model may only need a title, content, and publish time; while a 'product' model may require product name, price, stock, image group, detailed parameters, and so on.Through backend settings, you can add various types of custom fields for each model, including single-line text, numbers, multi-line text, single selection, multiple selection, and dropdown selection, etc.These fields directly determine what information you need to fill in when publishing content, and also determine how this information is displayed on the front-end page.

In the template, you can usearchiveDetailtag to get detailed data of a single document, througharchiveListtag to get a list of documents, even througharchiveParamsLabel to display custom field data.This means that you can design completely different display modules and styles for each content type based on the content model.For example, on a product detail page, you can easily loop out the various custom parameters of the product to make the information display more organized.

Precise control: Category, single page and URL layout

The structure and accessibility of the website largely depend on its categorization method, single-page management, and URL structure. AnQiCMS provides a wealth of customization options in these aspects:

  • Category Template:You can not only set a unified list template for all categories under a certain model, but also fora specific categorySpecify a dedicated template.For example, your 'Download' category may need a concise list, while the 'News' category requires summaries and thumbnails.download.htmlThis category will automatically apply the new layout. You can even set template inheritance for subcategories to simplify management.
  • Single page template:For independent pages such as 'About Us' and 'Contact Us', you can set their display layouts separately. Similar to category templates, in single-page management, you can specify an independent template file (such aspage/about.html),Let each single page have a unique design style.
  • URL layout (pseudo static):The URL structure of the website is crucial for SEO and user experience.AnQiCMS provides powerful pseudo-static rule management features.In addition to the built-in number pattern, model naming pattern, and classification naming pattern, etc., you can also customize the URL structure.{id}(Data ID),{filename}(Custom link name for data),{catname}(Custom link name for category),{module}The model table name variables, you can build personalized URLs that meet specific SEO strategies and user habits. For example, set the URL of the article detail page to/article/{filename}.html, or set the product list page/product/{catname}-{page}.html, can make your website URL more semantically meaningful and friendly.

Navigation and blocks: flexible construction of website structure

A good website layout depends on clear navigation and reusable page blocks.

  • Navigation management:AnQiCMS allows you to create and manage multiple navigation categories (such as top main navigation, footer navigation, sidebar navigation, etc.) in the background "Website Navigation Settings".Each navigation item supports multi-level nesting, you can link to built-in pages, specific categories, single pages, or even external links.navListLabels, you can easily get and render these navigation menus, and implement complex dropdown menus or multi-level navigation layouts.
  • Reusable blocks:AnQiCMS advocates code reuse, throughincludeandmacroTags, you can encapsulate commonly used code snippets (such as page headers, footers, sidebar ad slots, and general article/product display styles) and then introduce them where needed.This can reduce duplicate development and ensure consistency of the website style.extendsTags, allowing you to define a basicbase.htmlAs a "master", it includes the overall structure and common elements of the website, and other pages inherit this master and rewrite specific elements.