In the daily operation of AnQiCMS, we often come across content models and their fields.Among the fields with names that seem similar, such as 'Title' and 'Name', they actually carry entirely different responsibilities in practical applications.As an experienced website operations expert, I fully understand the importance of understanding these subtle differences for efficient content management, optimizing website structure, and enhancing user experience.TitleandNameFields, take a look at what roles they play.


Unveiling the 'Title' and 'Name' of AnQiCMS Content Model: A Deep Dialogue on User Experience and System Logic

AnQi CMS endows the website with strong adaptability and scalability with its flexible content model.Whether it is articles, products, activities, or any custom content type, we can build personalized content structures according to business needs.TitleandNameIt is often a place where many operators feel confused. Let's clear the mist and clarify their connections.

“Title” field: The core identifier of the content, facing the user

When we create or edit any content in the Anqi CMS backend, whether it's documents, categories, single pages, or tags, the most intuitive and most important input item is often the 'title'. In the context of Anqi CMS, this 'title' usually corresponds toTitlefield.

TitleThe responsibility of, as the name implies, is the name displayed to the public. It is the most recognizable information that users directly see on the website front end. For example:

  • an article of newsTitleIt is the summary of the news.
  • A product'sTitleIt is the name of the product.
  • A website category'sTitleIt is the name of the category, such as 'Company Profile', 'Latest News'.
  • a tag'sTitle, which is the text of the tag, such as 'SEO optimization', 'Go language development'.

From an operational perspective,TitleThe importance of the field is self-evident. It is directly related to:

  1. User Experience[en]:A clear and attractive title can guide users to click and read.
  2. Search Engine Optimization (SEO)[en]:Pagemetathe tag intitle[en]、Contenth1The titles in tags are key factors for search engines to judge the theme and relevance of a page. A well-optimized one.Titlecan significantly improve the visibility of the content in search results.
  3. Content RecognitionIn the content list and breadcrumb navigation,Titleit is the basis for users to quickly understand the context of the content.

In the template calls of Anqi CMS, we directly specify throughitem.TitleOr, inarchiveDetail/categoryDetailtags such as name="Title"Get and display the main title of the content. For example,{% archiveDetail with name="Title" %}It will output the current document's title. In addition, there is a 'Title Name' setting option when the custom model is created, which actually defines the main title of the content under the model in the background editing interface.Tag nameFurther emphasized the importance of its user experience level.

“Name” field: The logical name within the system, the cornerstone of structure.

Visible to the user.Titledifferent,NameFields play a more internal, programmed role as identifiers within the system.It does not directly face the end user, but serves the identification, classification, and data interaction within the system.NameThe usage of the field exists at different levels, reflecting its structured and programmed characteristics:

  1. The name of the content model itself (model name)When defining a completely new content model, such as a "product model" or a "service case model", we will specify a "model name" for it. This name (such as "article model", "product model") is the name of the model itself.Name. ThisName主要用于background management interface model identification, as well as some template tags that are throughmoduleIdormodelNameto specify which content model data to operate.

  2. The Field Name (FieldName) used to call custom fields in the content model:This isNameA significant application scenario of the field. When we add 'custom fields' to the content model (such as adding 'price', 'stock' and other fields to the product model), we need to specify a 'parameter name' for each custom field (this is the field label that users see in the background, more like a)Title)and a 'call field'(this is used by the developer to access the field in the template or APIActual Name, which isFieldName)。This 'call field' is a typicalNameIt must be lowercase English letters, used as column names in data tables or key names in programs to ensure that the system can accurately identify and access data. For example,item.priceor{% archiveDetail with name="price" %}ofpriceThis is itFieldName.

  3. URL Alias (URL Alias): Although the 'URL alias' mentioned in the document is more inclined towards a unique identifier for content, rather than a directNamefield, but it is with the content model'sName(Model table name or URL alias) are closely related. The 'URL alias' of the model is usually in lowercase English, used to build the module part of the pseudo-static URL (for example,/article/or/product/It defines access paths for different types of content at the system level.

NameThe core use of the fieldis:

  • Data structure definitionIt defines the classification of the content model and the programmable identification of each field within the model, which is the skeleton of the website data architecture.
  • Template invocation and data interaction: Developers throughName[For example, custom fields]FieldNameExtract data accurately in the template or transmit data through the API.
  • System internal processingIn database storage, routing resolution, permission control, and other background logic,Nameprovides a unique, programmer-friendly identifier.

Summary of distinction and purpose: One graph, two roles

We can imagine thatTitleandNameThe relationship is analogous to 'a person's name' and 'this person's ID on their ID card.'

  • TitleJust like 'a person's name':

    • function[en]: A term used for external reference, facilitating interpersonal communication, with emotional and meaningful connotations.
    • Features[en]: Can include Chinese, with a high degree of freedom, emphasizing readability and descriptiveness.
    • [en] Application scenariosWebsite front-end display, SEO title, content list, etc.
  • NameThe field is like 'This person's ID on the ID card':

    • functionThe system internal identifier, ensuring uniqueness, convenient for machine recognition and management.
    • Featuresusually consists of English letters, numbers, or underscores, with strict naming conventions (such as lowercase letters), emphasizing programmability and logic.
    • [en] Application scenariosThe identifier of the content model itself, the database key name of custom fields, parameter names of template tags, part of the URL path, etc.

Understanding this distinction can help us better utilize the powerful features of AnQiCMS. When designing content models and custom fields, we provide users with friendly "parameter names" (i.e.,}]}TitleDescription at a certain level), and allocates standardized "call fields" (i.e.,NameLayer identifier). This allows the content to be presented to users in an easy-to-understand manner and to be managed and processed by the system efficiently and structurally.


FAQ (