What are the naming conventions or suggestions when defining a custom contact method field?

Calendar 👁️ 66

In the powerful ecosystem of Anqi CMS, the flexibility of custom contact information fields is undoubtedly a key factor in improving website operation efficiency.As an experienced website operations expert, I know that every detail can affect the overall performance of the website, and the naming convention of 'parameter name', although seemingly trivial, is actually related to the maintainability, scalability, and smoothness of team collaboration of the website content.Today, let's delve into the naming conventions and practical suggestions for defining custom contact information fields when defining them in Anqi CMS.

The value of the AnQi CMS contact information customization feature

The 'Contact Information Settings' module of AnQi CMS is designed very user-friendly, in addition to the preset contact person, phone number, email and other basic fields, it also gives the operator strong customization capabilities.This means that you can easily add more personalized contact methods such as "WhatsApp account", "Facebook homepage link", "Online customer service QQ", "Specific branch hotline", etc. based on the specific needs or marketing strategy of the enterprise.This high degree of customization ensures that your website can fully and accurately display the communication channels between the company and the users.

However, when we flexibly define these custom fields in the background, an important issue arises: how should we name these 'parameter names' to be standardized, efficient, and error-free?

Official guidance and naming core principles

According to the relevant documents of Anqi CMS, the official has given clear guidance and suggestions on the naming of "parameter names". It mentions that:The parameter name is the name provided for template calling, letters will be automatically converted to camel case, which means the first letter of each word is capitalized and there are no spaces in the middle.You can also set the parameter name in Chinese, but it is recommended to set it in English."

From this passage, we can extract several core naming principles:

  1. Prefer English namingAlthough AnQi CMS allows the use of Chinese as parameter names, it is strongly recommended to use English from a long-term and technical perspective.English parameter names usually show better compatibility and stability in template parsing, cross-language environment support, and interaction with backend code.It can effectively avoid potential errors caused by character encoding or special symbol parsing issues, making your website run more stably.
  2. Strictly follow CamelCase naming convention (CamelCase)This is the default rule for automatic parameter name processing in AnQiCMS, which is also the naming convention commonly followed by the Go language community (the development language of AnQiCMS).Camel case naming method refers to the practice where each word of a parameter name consists of the first letter in uppercase, and words are not separated by spaces, underscores, or hyphens.AfterSalesEmailinstead ofafter_sales_emailorafter-sales-emailEven if you do not follow it when you enter it, the system may automatically convert it, but actively following can reduce confusion and improve predictability.
  3. Avoid using special characters and spaces: Except for the camel case naming method mentioned to avoid spaces, any special characters that may conflict with programming syntax (such as!@#$%^&*Avoid characters such as ()should be avoided. Punctuation should be avoided. Pure alphabetic and numeric combinations are chosen to ensure that parameter names can be correctly identified in any parsing environment.

Why are these naming conventions so important?

Follow the naming conventions, not just for the sake of 'looking good' or 'conforming to conventions', but for the actual benefits it brings in many aspects:

  • Improve readability and maintainability: A clear and uniform naming style allows you and your team to quickly understand the use of each field.When the scale of a website expands or requires long-term maintenance, a good naming system can greatly reduce the cost of understanding and the difficulty of troubleshooting errors.
  • Reduce errors and conflictsThe standardized naming can effectively avoid template parsing failures or data calling exceptions caused by spelling errors, inconsistent naming, or conflicts with system built-in fields.
  • Promote teamworkA set of unified naming conventions is the foundation for efficient collaboration when multiple operation or development personnel manage a website.It reduced communication costs and ensured consistency in code and content logic.
  • Enhance template calling efficiency: The template tags of AnQi CMS, such as{% contact with name="参数名" %}, directly depend on these parameter names. Standard naming allows you to refer to the required data with more confidence and efficiency when writing or modifying templates.

Tips for actual operation

On the Anqi CMS backend, in the 'Backend Settings' -> 'Contact Information Settings' page, when you click 'Customize Settings Parameters' and add a new entry, please directly enter the English camel case naming you have thought of according to the above specifications. For example, if you want to add 'WeChat Customer Service ID', you can name itWeChatServiceId.And the "parameter value{% contact with name="WeChatServiceId" %}This way to get its value.

In summary, defining the 'parameter name' for the custom contact information field in Anqi CMS is not just a simple text input, but also a strategic choice that needs to take into account both technical specifications and operational efficiency.Adhering to the principle of English first, camel case naming, and avoiding special characters, it will bring a more stable, more efficient, and easier to maintain content management experience to your website.


Frequently Asked Questions (FAQ)

Q1: Can the parameter name of the custom contact information field be in Chinese?A: SecureCMS allows you to set parameter names in Chinese, but from a technical perspective and based on practical experience, it is strongly recommended to use English.English parameter names better adapt to the parsing mechanism of template engines, reduce potential compatibility issues, and enhance code readability during team collaboration, especially when undergoing secondary development or cross-language deployment.

Q2: Can you use underscores or hyphens when naming parameter names? For examplecustom_phoneorcustom-phone?A: According to AnQiCMS's official recommendations and its Go language features, custom parameter names should follow the 'camelCase' naming convention, which means each word should start with an uppercase letter and not contain spaces or special symbols. The system will automatically try to convert names that do not comply with this rule, but in order to maintain consistency with the internal processing logic of the system and avoid unnecessary parsing errors, it is recommended that you actively useCustomPhoneThis form, notcustom_phoneorcustom-phone.

Q3: What if the custom parameter name I define conflicts with the built-in contact information field name (such asEmail/Cellphone) what will happen?A: Although the AnQiCMS backend interface usually avoids you creating parameter names that are exactly the same as built-in fields, in extreme cases, if there is a repetition, it may lead to confusion or overlay when the template is called.To avoid this uncertainty, it is strongly recommended that your custom parameter names be unique and not duplicate any system built-in field names.MyCompanyEmailTo ensure uniqueness, thus avoiding potential problems.

Related articles

How to add a new custom contact field in the AnQiCMS contact information settings?

## Contact Information Setting for AnQi CMS: Easily add custom fields to meet your unique needs In the operation of a website, an efficient and personalized way of displaying contact information is often the key to establishing trust and promoting conversions between enterprises and users.AnQi CMS knows this, its powerful customizability allows you to easily go beyond default settings, add exclusive contact fields to your website, and ensure that your site perfectly fits the unique needs of your business.AnQi CMS is an efficient and customizable enterprise-level content management system that provides rich content models and SEO tools

2025-11-06

How to call the custom contact information field added in the AnQiCMS template?

The complete guide to calling the custom contact information field in AnQi CMS template: from backend configuration to frontend display As an experienced website operations expert, I know the importance of a flexible and efficient content management system for a corporate website.AnQiCMS stands out among many CMSs with its powerful custom capabilities and SEO-friendliness.It can not only help us easily manage content, but also seamlessly integrate various information configured in the background with the front end of the website through its flexible template mechanism.Today, let's delve into a very practical scenario

2025-11-06

Does the AnQiCMS contact information tag support displaying multiple custom social media accounts at the same time?

As an experienced website operation expert, I know that in an increasingly diversified digital age, whether a website can effectively connect with its audience largely depends on the breadth and convenience of its contact information.AnQiCMS (AnQiCMS) has always been committed to providing flexible and efficient solutions in content management, then, is the contact information label of AnQiCMS supported to display multiple custom social media accounts simultaneously?This specific question, my answer is: **Fully supported and very flexible

2025-11-06

How to display all AnQiCMS contact information uniformly at the footer of the website without repeating code?

Certainly, as an experienced website operations expert, I am more than happy to provide a detailed explanation of how to implement the unified management and display of website footer contact information in AnQiCMS, ensuring efficient content maintenance and concise code. --- ## Say goodbye to repetitive labor: Efficiently manage website footer contact information in AnQiCMS In website operations, the footer usually carries important information such as the company's contact information, copyright statements, friend links, filing numbers, and so on.This information is not only an important way for users to obtain the basic situation of the site

2025-11-06

How should the 'parameter value' be filled in for the customized contact information in the AnQiCMS background to be correctly called in the template?

As an experienced website operations expert, I am well aware of how crucial it is to efficiently utilize each feature of a rich platform like AnQiCMS to serve the website content.Today, let's delve deeply into a seemingly simple yet often perplexing issue for many operators: 'How should the 'parameter value' of the customized contact information be filled in the AnQiCMS backend so that it can be correctly called in the template?'}]This is not just a technical detail, it is also about the precise presentation of website information and the smoothness of user experience.

2025-11-06

What is the actual function of the 'remark' field in AnQiCMS custom contact information?

As an experienced website operations expert, I am well aware that every detail of a CMS system may have a profound impact on the operational efficiency and long-term maintenance of a website.AnQiCMS (AnQiCMS) has become a powerful assistant for many enterprises and self-media in content management, thanks to the efficiency and excellent expansion capabilities brought by the Go language.Today, let's talk about a seemingly insignificant feature in AnQi CMS that plays a huge role in actual operation - the "note" field in the custom contact information.### Flexible Contact Management

2025-11-06

Does the contact label support setting links to overseas communication tools such as WhatsApp?

As an experienced website operations expert, I am well aware that in the digital wave, enterprises need to maintain seamless connections with global customers.When it comes to configuring website contact information, especially the integration of overseas communication tools, the flexibility of AnQiCMS (AnQiCMS) always impresses me.Many friends will ask: Does AnQi CMS support setting links to overseas communication tools such as WhatsApp?My answer is: **Fully supported and very convenient to implement!

2025-11-06

How to configure contact links for social media such as Facebook, Twitter, etc. in the AnQiCMS background?

As an experienced website operations expert, I know the importance of every detail for website user experience and brand promotion.In the era of social media dominance, seamlessly connecting your website with major social platforms can not only broaden the channels of information dissemination but also enhance user interaction and brand influence.AnQiCMS (AnQiCMS) with its powerful flexibility and ease of use, provides us with an elegant solution.

2025-11-06