As an experienced website operations expert, I fully understand that fine control and display of time dimension information in a content management system is crucial for website operations and user experience.Whether it is the publication time of the article or the last update time of the content, it can convey important information to the reader and also have a positive impact on search engine optimization (SEO).moduleDetailLabel, see if it provides fields to obtain the model creation time or update time to achieve more refined template display.
In-depth exploration of Anqi CMS.moduleDetailLabel and time field
AnQi CMS, with its high-performance architecture based on the Go language and flexible content model design, has won the favor of many small and medium-sized enterprises and content operation teams.One of its core advantages is that it allows users to customize content models according to business needs, which greatly enhances the adaptability of the system, enabling the publication of a diverse range of content structures such as articles, products, and events.
When we talk aboutmoduleDetailtags, we usually focus on how to obtain detailed information about the specific content model itself. We can clearly see from the template tag document of Anqi CMSmoduleDetailTags are used to obtain the details of the document model. It supports obtaining data for the specified model by model ID (id) or URL alias (token) and provides information such as model ID (Id)、Model Title(Title)、Model Name(Name)、Model Keywords(Keywords)、Model Description(Description)、Model Link(Link) and the model table name (TableName) fields are provided for template use.
However, after careful reviewmoduleDetailThe available field list of the label, we can easily find that,It does not include directlyCreatedTime(Creation time) orUpdatedTimesuch fields as (Update time)This means, throughmoduleDetailLabel, we cannot directly obtain the creation or update time of a content model in the frontend template.
Understanding the time difference between "model" and "content under model"
The key is to understand the difference between the 'content model' itself and the specific content created through the content model (such as articles, products).
A content model (such as an 'article model' or 'product model') can be considered as a blueprint or structural definition of content.This model may be built-in during system initialization, or may be customized by the administrator according to business requirements.The creation time or update time of the model, which is more related to internal system management and audit information, it records when this "blueprint" is defined or modified.Specific article contentWhen was it released, or when was the latest modification made.
AnQi CMS is well-versed in this, therefore it is good at dealing with tags for specific content items (such asarchiveDetailUsed to obtain document details) we indeed foundCreatedTimeandUpdatedTimeThese two crucial time fields. For example, when usingarchiveDetailtags, you can easily go through{{stampToDate(archive.CreatedTime, "2006-01-02")}}To format the display time of the document or use{{stampToDate(archive.UpdatedTime, "2006-01-02 15:04:05")}}To display the update time of the document. This fully demonstrates that Anqi CMS provides rich time information support at the content level.
精细化模板显示:Practice Considerations in Application
For website operation, if we need to display in the template something like 'The articles under this content model were last updated at XX time', this usually refers to the model undera certain documentThe latest update time, not the update time of the model definition itself. Therefore, for refined template display, we are more inclined to:
- On the content detail pageUtilize
archiveDetailThe tag directly displays the current document'sCreatedTimeandUpdatedTimeInform the user of the publication and update status of the article. - On the content list pageUtilize
archiveListWhen the tag loops through the content list, display the article ofCreatedTimeorUpdatedTime. Even according toUpdatedTimeSort and highlight the latest updated content. - On the model homepage or category page: If you need to display the latest dynamic of the model dimension, it is usually done through
archiveListLabel to get the latest released or updated articles under the model, and display the time of these articles instead of the time defined by the model.For example, on the "News Center
In short, althoughmoduleDetailThe label does not provide the ability to obtain the creation or update time of the content model itself in the current version of Anqi CMS, but this does not affect our creation of items through this modelSpecific content itemsDisplay flexible time information.The system has provided a comprehensive solution for the timeliness display of content levels, which can fully meet the needs of the vast majority of website operations and content marketing.If a special business scenario in the future indeed needs to display time information at the level of content model definition, it may need to be obtained through secondary development or by using system logs and other methods, but this goes beyond the scope of standard template tags.
Frequently Asked Questions (FAQ)
Q1: Does AnQi CMS support displaying the publication and update time of articles on the article detail page?A1: Yes, Anqi CMS provides a very convenient way to display the publication and update time of articles. You can use it in the article detail template.archiveDetailtags, throughname="CreatedTime"andname="UpdatedTime"Field to retrieve and format display these timestamps, for example{{stampToDate(archive.CreatedTime, "2006-01-02")}}.
Q2: How can I display the creation time of a content model (such as "product model") in a template?A2: According to the current document, Anqi CMS'smoduleDetailThe tag does not directly provide the creation or update time field of the content model for the template to call.Generally, the front-end display is more concerned with the publishing/update time of specific content items (such as individual products).If you indeed have this special requirement, you may need to consider extending through the backend API interface or consulting the internal database records of the system to achieve it, but this falls under the category of secondary development and is not a standard template feature.
Q3: How to ensure that my website content displays the latest update time to help with SEO?A3: Firstly, you need to make sure that the update time is set when editing the content (UpdatedTimeIt is accurately recorded. You can prioritize display in the templateUpdatedTimeEspecially in the article list or detail page, so that search engines and users can see the latest status of the content. Anqi CMS'sarchiveListandarchiveDetailTags support callingUpdatedTime, along withstampToDateThe filter can achieve this.