Feature preview
Whether the abstract is exposed depends on which field is taken from the list page, not the visible range written on the title. AnQiCMS uses user management and VIP grouping to set access permissions for different user groups, and the permissions need to be received at three places: list data acquisition, detail page, and interface return. Hiding only the detail page means that the abstract is still exposed in the list, and the first few paragraphs of the text can still be read.
Whether the full text summary of the article visible to members will be displayed on the list page, where is the permission collected? Whether the summary is displayed on the list page depends not on which visible range the background has set for this article, but on which field the list template reads when retrieving data. Permissions should be collected at these three places: list retrieval, detail page, and interface return. Only collecting the detail page is the most common mistake.
The first control point is the list. The list page usually takes the title and abstract, if the abstract is taken from the beginning of the text, then the first few paragraphs of this content are open to everyone. The second control point is the detail page and text rendering, which everyone usually does. The third control point is the interface return: the front-end template blocks, and the interface document details may still return the entire text field, and you can see it by catching the interface once.
AnQiCMS user management and VIP group are used to set access permissions for different user groups, and the configuration items themselves are on the group, and the implementation needs to cover the above three points to be settled.
通常摘要泄露不是因为权限代码错误,而是字段设计不当。Custom content models support flexible content structures, separating 'visible to the public introduction' into a separate field, so the list page only reads this field, and the full text of member articles will not be exposed in the list; conversely, if the content model only has a full text field, the list template can only truncate the text, and in this case, no matter how the judgment is added, what is exposed is the real beginning.
There are two methods: for articles meant to attract public attention, make the summary consistent with the full text; for exclusive member articles, fill in an independent introduction field, only write selling points without writing conclusions.
It is recommended to divide the dimensions of the group according to 'access purpose' rather than price categories. The visitor group only sees the list and introduction; registered users can view the full text; in the VIP group, further distinctions are made on whether attachments, interface call quotas, and the like are needed. In this way, the permission judgment falls on the group, and both the template and the interface follow the same set of group names, without having to set each article separately.
In the content model, if you want to express 'which visible range does this article belong to', using a custom field is clearer than using categories. Categories generally undertake the responsibility of content navigation, and mixing visibility into categories will lead to mutual constraint between navigation and permissions.
These two things are often discussed together, but in the opposite direction. Access permission solves the problem of 'people who should not see cannot see', while anti-collection interference code solves the problem of 'it costs more for people who can see to move in bulk', AnQiCMS's interference code belongs to the latter, which does not affect normal reading and does not bear the responsibility of permission.
Similarly, sensitive word filtering and keyword replacement, and content review belong to content quality control before publication, not visibility control. Treating review as a permission method may lead to the misunderstanding that 'since the content review is passed, everyone can see'.
First add an independent summary field to the content model, change the method of truncating the body to reading the summary field, then fill in the summary for each article one by one. The order cannot be reversed, otherwise the list will display blank when the field is empty.
The summary on the list page, the description of the search results, and the preview text shared out may all come from the beginning of the body, which is equivalent to giving the conclusion to unlogged-in visitors for free.
Directly request the document detail interface with an unlogged-in identity to see if there is a body field in the return body. The interface return does not make grouping judgments, and no matter how well the foreground is hidden, it is useless.
Preview
After the schedule is changed, whether to rerun the push depends on whether this document has appeared in a formal state before. If it is just a draft changed to a later time, the URL has not entered the site map and has not been actively pushed, then there is no need to rerun; once the document has been launched or pushed, the rescheduling must be carried out in accordance with the order of the site map and link push.
Preview
After adding a new field to the custom content model, the empty value of this field in historical articles is a normal phenomenon. The problem lies in the display and value assumptions. The processing order is: first, add an empty value as a fallback in the template list display, then decide where to place the default value in the model layer or the write layer, and finally, only batch fill in the old articles that truly need unified values, to avoid a one-time change that exceeds the scope.
Preview
It is important to back up before opening the template editor, not after making changes. AnQiCMS's AI visual template editor can directly modify template code, and the larger the changes, the more necessary it is to have a rollback snapshot; the backup covers data and static files, starting from v3.6.5, it also expanded the template backup table, use it to store an original template first, then let the AI take over.