Feature preview

Feature Introduction

What information can be placed in the custom fields of the content model, and how to use them on the list page

Custom fields are suitable for carrying structured, comparable, and filterable information, such as parameters, scope of application, time and contact information categories; long-form text, frequently changing marketing copy, and any certificate-type content are not suitable for putting into fields. There are usually two ways to use fields on the list page: directly outputting them by field name in the template, or participating as a filtering and sorting condition in the list generation, which has different requirements for field types

list page Custom field Content model

Feature Introduction

What information can be placed in the custom fields of the content model and how to use it on the list page? The criterion is whether this content will be used for comparison, filtering, or batch output: if so, it should be made into a field; if not, it should remain in the main text. The value of the field lies in allowing the list page and detail page to share the same typed field value, at the cost of changes affecting all templates that reference it, so not all additional information can be stuffed into the field.

What is suitable to store in the custom field

Type of information Is it suitable to be a field Reason
Specification parameters, applicable scope Suitable Need to compare and screen across articles
Price range, version number Suitable Sorting and filtering on the list page
Time-related information (release, validity period) Suitable Participation condition judgment and display format
Long description text Not suitable Belongs to the main text, difficult to maintain the format in the field
Marketing phrases that change frequently Not suitable Any change requires updating all templates that reference it
Keys, credentials, and other sensitive content Prohibit Fields are output based on the details interface

In one sentence: Fields are for machine reading, and the main text is for human reading. Content that needs to be listed, compared, and filtered should be made into fields; content that can be explained clearly in one article should remain in the main text.

What content should not be included in fields

The three types of content are most easily misplaced. The first is a whole paragraph of explanatory text, storing long text in the field will make the list page output difficult to truncate, and it also bypasses the formatting and filtering rules on the main text side. The second is the slogans or prompts used throughout the site, this type of text changes frequently, and each adjustment requires changing the data item by item after being placed in the field, the correct approach is to use site-wide replacement or unified control at the template layer. The third is any type of credential information, including interface tokens and service account content, the field will be taken away with the document details by the interface, and writing it in the field is equivalent to writing it in the public output.

Pay attention to the expansion of the number of fields. When there are dozens of fields in the same content model, the readability and maintenance cost of the template will decrease, and fields with repetitive meanings should be merged.

There are two ways to use the list page

One is to output directly: in the template, take values by field name, render them to the list card, which is often used to display parameter summaries or scope tags. This method requires that the fields have stable default values; if missing, the list will appear blank items.

Another is a participation condition: Use the field as a filter or sorting basis, for example, generate a list by version or application scenario. At this time, the field type should be selected as a comparable type, and sorting text fields usually does not yield the expected results.

In AnQiCMS, the content model defines the set of fields available for each type of document, custom fields are visible on the article editing page and in the list conditions; the static rules determine how the filtering parameters of the list page are written into the address, custom static can agree on the form of parameter presentation, rather than using the default query string format. Both should be designed together, changing the address form after the field name is set costs less.

Does the template need to be updated when the field is changed?

To check if the change is in the name or the value. Changing the name will cause all templates referencing this field to be unable to retrieve the value, which is a destructive change; only changing the value does not affect the structure of the template. It is recommended to keep a backup that can be rolled back before making changes, and to check the output of the list page and detail page page by page after the change.

The order of deleting fields is also important: first remove the reference from the template, then confirm that no filter conditions are still using this field, and finally delete the field itself. The deleted content can be found in the recycle bin, whether the structure of the field and the filled data can be restored together should be based on the current version of the backup, and do not treat the recycle bin as a long-term archive.

Before releasing, sampling checks can be quickly filtered out in batches using AI automatic tags generated when creating articles, but tags cannot replace the structural constraints of the field itself.

Common questions

Question: What is the difference between fields and category tags?Answer: Tags are used for cross-model classification, and fields are used to describe the attributes of this type of document itself; values that need to participate in sorting or grouping display are more suitable for fields.

Question: How many fields should a content model have at most?Answer: There is no strict limit, but in practice, it is better to control it within a dozen or so; when it exceeds this, it is preferable to split it into a new content model or classify it into tags.

Question: Can field values be truncated and displayed on the list page?Answer: Yes, but the truncation rules should be written at the template level uniformly; pre-truncating in the data will destroy the integrity of the detail page and the interface output.

Related functions

Preview

After batch link replacement, do we need to rebuild the static pages that have already been generated?

After replacing the link using the background full-site replacement, whether to rebuild the statically generated pages that have already been created depends on whether the site has enabled staticization. The replacement action falls on the data layer, the front-end address is determined by the pseudo-static rules and caching, and there is no need to rebuild for pure dynamic rendering. After staticization is enabled, it is necessary to rebuild during off-peak hours and perform sampling verification, and a 301 redirect should also be set up as a fallback.

Preview

Why can documents be recovered after being deleted, and how many states are there in total?

Documents can be recovered after being deleted because the deletion of formal documents is executed by moving them to the recycle bin instead of a physical deletion. The document status of AnQiCMS is divided into four types: formal documents, drafts, pending publication, and recycle bin, each corresponding to different visibility and flow paths. This article summarizes the conversion between the four states, the differences between draft previews and public releases, and the usage of scheduled release at a point in time.

Preview

When filling in the main text in the background, I want to change the template easily. What method does not require writing code?

A small-scale title style, paragraph layout, and module sequence adjustment can be edited using an AI visualization template directly in the preview to complete the change intention, and then fall back to code confirmation; changes involving content model fields and page structure still need to return to field definition. This article explains the boundary and rollback methods of the two methods of change.