In AnQi CMS, one of the cores of content management is to control the status of documents, which is directly related to the visibility and review process of website content. When you go througharchive/listWhen the interface retrieves the document list, the returned data containsstatusThe field assumes this key responsibility. Understanding the meaning of this field can help you manage the website content more efficiently and ensure that information is presented correctly to visitors.

statusField: Weather chart of document visibility and review status

Inarchive/listEach document (archive item) in the returned result of the interface will contain a field namedstatusThe integer field. This field is used to clearly indicate the display status of the current document and the review stage it is in.In simple terms, it tells you whether this document has been published, is under review, or is in some other non-public status.

According to the AnqiCMS documentation,statusThe field mainly has two core values representing the two most common states of the document:

  • statusThe value of1:This indicates that the document has passed the review and is in a "published" or "normal display" status. When you see a document'sstatusWhen it is 1, you can be sure that it is visible to the front-end user, will appear on the corresponding list page, detail page of the website, and can be normally indexed by search engines.This is the final public state that the content publisher hopes to achieve.
  • statusThe value of0:This usually means the document is in a "reviewing" or "draft" state.This document has not been published yet. It may be a new content that has been created but not completed, or it is waiting for editing or review by an administrator.The document in this state is not directly accessible to front-end users, it maintains a non-public attribute until itsstatusthe value has been updated to1.

Considerations in practical applications.

UnderstandingstatusThe meaning of these fields is of great practical value for the daily operation and development of the website:

  1. Front-end display logic:For front-end developers,statusThe field is the key to controlling content display. When building a website, it is usually set up to only displaystatusWith1The document ensures that users can only see approved and published content. This effectively prevents incomplete drafts, sensitive content, or accidental leakage of incorrect information.

  2. Content review process:For content editors and operations personnel,statusthe field is a direct reflection of the internal workflow. After a new content submission,statusDefault to0This prompts the reviewer to conduct a review. Once the content meets the publication standards, the reviewer will publish itstatusUpdated to1Thus, completing the publishing process. This ensures the quality and compliance of the website content.

  3. Data Analysis and Management:By processingstatusThe analysis of the field can quickly understand the proportion of published and pending content on the website, thereby evaluating the efficiency of content production and review. For example, if a large number of documents remain unchanged for a long time.status=0This may mean that there is a bottleneck in the review process.

It is worth mentioning that not only documents in Anqi CMS, but also modules such as comments, categories, tags, and even uploaded attachments, have universally adopted a similarstatusA field is used to indicate the visibility or review status of each. This unified design concept makes it very consistent and intuitive to manage and understand content status throughout the CMS system.

In short,archive/listThe interface returnsstatusThe field is not just a simple number, it is an effective tool to understand and control the content lifecycle of Anqi CMS website, ensuring the quality of publication and user experience.


Frequently Asked Questions (FAQ)

Q1:archive/listThe interface returnsstatusIs there any other possible value besides 0 and 1?

A1:According to the Anqi CMS documentation, for the visibility or review status of documents,statusThe field mainly manifests as0Under review/Not published and1(Reviewed/Published). In certain cases, there may be other status values internally (such as, taken down or deleted by administrators), but for public content interfaces,0and1The most common and core state that needs attention. It is recommended to refer to the documentation in actual development and handle compatibility for possible unknown state values.

Q2: Can I directly pass through?archive/listInterface filters specificstatusdocuments? For example, only get published documents?

A2:Consultarchive/listThe request parameters of the interface currently do not provide direct filtering bystatusThe parameter for filtering fields. Anqicms is usually designed to return published documents by default. If you need to filterstatusWith0or1Filter the document according to your requirements, usually after obtaining the list of all documents, you need to traverse and filter them in your application layer code so that you can according tostatusThe value determines which content needs to be displayed or processed.

Q3: If I visit astatusdetail page of a document with value 0, what will I see?

A3:In most cases, if the document'sstatusWith0(Under review or not released), front-end users cannot access the detailed page through regular links. Anqi CMS handles such requests based on the content of thestatusMake a judgment. This means you may see prompts such as 'Page not found', 'Content under review', or 'Access denied', etc. The specific content displayed depends on your website template configuration and the system settings of the AnQi CMS backend.This is an important security mechanism, ensuring that only content approved by the review can be accessed by the public.