In the daily operation of AnQiCMS, the global information and contact information of the website are highly concerned by users and frequently change.How to efficiently and uniformly manage and display this information is an important standard for measuring the flexibility of a content management system.systemandcontactThese core tags provide an extremely convenient solution for calling website content and contact information.

systemTags: easily control the global information of the website.

systemThe tag is the central information hub of your website, it can retrieve and display all the information configured in the background "Global Function Settings".This information is usually common to the entire website and has a universal nature, such as the brand identity, operating status, and basic configuration of the website.

BysystemLabel, you can easily call the following key global information:

  • Website brand informationIncluding the website:name(SiteName) andLogo(SiteLogoThese are the most intuitive elements that users recognize on your website, and they are usually found in the header, footer, or brand promotion page of the website.
  • Basic link addressOf the website:Home page address(BaseUrl) andMobile end address(MobileUrl). Properly setting these addresses is crucial for ensuring normal access to the website and resource loading, as well as for search engine optimization (SEO).
  • Path related to template:Template static file address(TemplateUrl) andTemplate directory name(TemplateName). This information is very useful for template development and maintenance, ensuring that CSS, JavaScript, and other static resources can be correctly referenced.
  • Compliance and legal informationOf the website:Record number(SiteIcp) andCopyright content(SiteCopyright). These are the manifestations of the legitimate operation of the website and are usually displayed in the footer of the website.
  • Website operation status: When the website is under maintenance or upgrade, you can setShutdown prompt content(SiteCloseTips),systemTags can be retrieved and displayed to visitors.
  • Multilingual SupportTo get the website settings:Language package(LanguageThis is particularly important for websites that need to support multilingual content, as it can assist with language switching or adaptation.

Furthermore,systemThe label also has great extensibility. You can set it according to actual needs in the background "Global Feature Settings"Custom additional parametersFor example, if you need to display an external help page link at a specific location (HelpUrlOr a special tracking code ID, just add a custom parameter in the background, and then pass throughsystemSpecify the tagnameThe attribute is the parameter name, and it can be flexibly called in the template.

In the template application exampleImagine that on the header of your website, you want to display the company logo and show the copyright information and filing number in the footer. BysystemLabel, you do not need to modify the template code each time you change this information. Just update it in the background, and the front-end will display the latest content synchronously. For example,{% system with name="SiteLogo" %}You can get the website logo image address, and{% system with name="SiteCopyright" %}It will output the copyright statement you set.

contactTag: One-stop management of contact information

contactThe tag focuses on the contact information of the website, it integrates all the channels related to user communication, making it convenient for you to display in all corners of the website.This information plays a key role in helping users find you quickly and build trust.

contactThe tag can retrieve and display the following commonly used contact information:

  • Basic contact informationIncludingContact(UserName) andContact phone number(Cellphone) andContact address(Address) andContact email(Email). These are the basic contact methods for corporate or personal websites.
  • Social media accounts: To meet the diverse communication habits of modern users,contactSupports calling a series of social media information such asWeChat ID(Wechat) andWeChat QR code(Qrcode) andQQ(QQ) and platforms such asWhatsApp(WhatsApp) andFacebook(Facebook) andTwitter(Twitter) andTikTok(Tiktok) andPinterest(Pinterest) andLinkedIn(Linkedin) andInstagram(Instagram) andYouTube(YoutubeThis is crucial for expanding into global markets or covering different user groups.

withsystemTags are similar,contactTags also supportCustom parameter. If you have special or localized contact information, such as a specific customer service hotline extension number, or a regional social media link, you can add custom parameters in the "Contact Information Settings" and use them tocontactThe tag is called. This greatly enhances the flexibility and adaptability of the contact information display.

In the template application example: Whether on the independent "Contact Us" page or quickly displaying the company's phone and email address in the website's footer,contactTags can help you a lot. For example, if you want to display the contact phone number in the footer, you can use it like this:电话:{% contact with name="Cellphone" %}. If you need to display the WeChat QR code on a page, just call it.{% contact with name="Qrcode" %}It can render the image address.

Unified call, flexible configuration

systemandcontactThe calling methods of these two tags follow the unified syntax of AnQiCMS template tags.{% 标签名 变量名 with name="字段名称" %}. Among them,变量名Optional, when you need to perform further processing on the data you obtain, you can assign it to a variable.nameThe property specifies the specific fields you want to retrieve.

It is worth mentioning that in multi-site mode, if you need to call information from other sites, both of these tags support passing throughsiteIdThe parameter specifies the target site, which provides convenience for flexible scheduling of multi-site content.

In summary, AnQiCMS'ssystemandcontactTags greatly simplify the management and display of global information and contact methods on the website.They closely integrate the background configuration with the front-end display, ensuring consistency of website information, improving operational efficiency, and providing strong flexibility for the long-term maintenance and iteration of the website.


Frequently Asked Questions (FAQ)

1. Why didn't the front page update when I modified the information in the "Global Function Settings" or "Contact Information Settings" in the background?In most cases, the front-end will synchronize immediately after the background information is updated.If there is an outdated situation, please first check your browser cache, try clearing the cache or access in incognito mode.Secondly, the AnQiCMS system may have a caching mechanism, you can try clicking the 'Update Cache' function in the background to refresh the system cache.If the problem still exists, it may be due to an error in the template code being called, or your server environment (such as Nginx reverse proxy) is misconfigured, preventing timely updates of information.

2. How to forsystemorcontactHow to add custom fields and call them in a template?You can find the "Custom Setting Parameters" section on the "Global Function Settings" or "Contact Information Settings" page of the AnQiCMS backend. Here, you can add new parameter names such asCustomLink)、parameter value and notes. After saving, it can be used in the template{% system with name="CustomLink" %}or{% contact with name="CustomLink" %}The form to call your custom parameter values has been implemented. It is noted that parameter names should be as alphabetical as possible, and the system will automatically convert them to camel case.

3. In multi-site mode,systemandcontactIs the information obtained from the tag general or independent for each site?The configuration of each site in the multi-site mode of AnQiCMS is in the "Global Function Settings" and "Contact Information Settings" in the backgroundindependentThis means that your main site and sub-sites can have their own independent website names, Logos, contact phone numbers, and other information. However, as mentioned in the article,systemandcontacttags are supportedsiteIdParameter. If you indeed have special needs for cross-site invocation information (such as displaying specific contact information of a sub-site on the main site), you can specifysiteIdto achieve.