How to call and display the website name, Logo, filing number, and other global configuration information using the `system` tag?

Calendar 👁️ 74

Building a website in AnQi CMS, basic information such as the website name, Logo, filing number, copyright information, and so on, is an important element that constitutes the overall style and professionalism of the website.This information often needs to be managed uniformly and flexibly called from all corners of the website.A security CMS provided for thissystemTags, it acts like a central console, allowing us to easily call and display these global configuration information.

UnderstandingsystemThe working principle of tags, first of all, it is necessary to clarify that this information is usually configured in the "Global Function Settings" of the AnQi CMS backend.Here, you can set the name of the website, upload the Logo image, fill in the filing number and copyright statement, and even define some custom global parameters.Once these settings are complete, the front-end template can be throughsystemTags to retrieve and display them.

systemThe basic usage of Tags is{% system 变量名称 with name="字段名称" %}. Here,变量名称Optional, if set, you can assign the data obtained to a temporary variable for subsequent reuse; if omitted, the tag will directly output the obtained content.name="字段名称"It is the key, it tells the system which specific global configuration item you want to call.

Let's take a look at how to go throughsystemLabel to call and display this common website global configuration information:

FirstlyWebsite Name. It usually appears in the title bar, navigation bar, or other prominent positions on a webpage, representing your brand.After configuring the "Website Name" in the "Global Feature Settings" backend, you can use it in the template.{% system with name="SiteName" %}To get. For example, place it in the HTML's<title>Tags within can effectively improve search engine optimization (SEO) effect.

Next isWebsite Logo. As the visual identity of the website, the display of the Logo is crucial. After uploading the Logo image on the backend, through{% system with name="SiteLogo" %}You can get its image address. You can embed it in the template like this:<img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" />Here, we cleverly combine the Logo image with the website name as the alternative text (alt attribute), which improves accessibility and also benefits SEO.

Website registration numberIt is an embodiment of the compliance of domestic websites. The website registration number filled in the "Global Function Settings" can be accessed through{% system with name="SiteIcp" %}Call. It is often placed at the bottom of the website and linked to the MIIT filing query website, for example:<a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a>.rel="nofollow"The attribute here reminds the search engine not to track this link,target="_blank"Then let the link open in a new window to maintain the user's experience on your website.

Copyright informationIt is usually displayed in the footer of a website, stating the copyright ownership of the website content. After filling in the relevant content in the "Global Function Settings" "Copyright Information" field in the background, you can use{% system with name="SiteCopyright" %}Get it. It is worth noting that if your copyright information contains HTML tags (such as&copy;), in order to parse and display it correctly, you may need to use it in conjunction with|safefor example:<div>{% system siteCopyright with name="SiteCopyright" %}{{siteCopyright|safe}}</div>.

In addition to the core information mentioned above,systemtags can also help you access other important global settings, such as:

  • The home page address (BaseUrl) and the mobile address (MobileUrl)These are very useful when building internal links or handling mobile adaptation.
  • Static file address of the template (TemplateUrl)When you need to reference CSS, JS, or other static resources in the current template directory,{% system with name="TemplateUrl" %}Can provide the correct path, for example:<link href="{% system with name="TemplateUrl" %}/css/style.css" rel="stylesheet">.
  • Current template directory name (TemplateName) and the closed station prompt content (SiteCloseTips): These can also be accessed throughsystemLabel acquisition, convenient for templates to dynamically adjust according to the current state or the template used.
  • Site language (Language)In a multilingual website, this can be used to set the HTML'slangattribute, for example:<html lang="{% system with name='Language' %}">.

The strength of AnQi CMS lies in the fact that it allows you to add in the "Global Function Settings".Custom parameter. If you have special requirements, such as needing a universal help page link, you can add a custom parameter named 'HelpUrl' in the background and fill in the link address.In the template, you can use{% system helpLink with name="HelpUrl" %}{{helpLink}}To flexibly call this custom link.

For AnQi CMS deployment that supports multiple sites,systemthe tags also providesiteIdParameter. If you need to display global information from another site in a template on a site, just specify the target site in the tag.siteIdFor example{% system with name="SiteName" siteId="2" %}This allows for flexible cross-site information calls.

In summary,systemTags are a basic and powerful tool in the development of Anqi CMS templates.It seamlessly connects the background global configuration with the front-end display, allowing website operators to efficiently manage and update various general information of the website, whether it is brand image, legal statements, or functional links, all of which can be realized through unified control and display, thereby greatly enhancing the maintainability and user experience of the website.


Frequently Asked Questions (FAQ)

  1. Question: Why did I pass through?{% system with name="SiteCopyright" %}After calling the copyright information, if the content contains HTML tags (such as<br/>It will be displayed directly on the page, not parsed as a line break?Answer: This is because the Anqi CMS template engine defaults to escaping HTML entities for security reasons. If your copyright information indeed needs to include HTML tags, and you confirm that this content is safe, you can use it when calling it.|safeA filter to indicate that the template engine should not escape this content, for example:<div>{% system siteCopyright with name="SiteCopyright" %}{{siteCopyright|safe}}</div>.

  2. Ask: How can I call the value of a custom parameter named "Customer Service Phone" that I added in the "Global Function Settings" in the background?Answer: You can usenameParameters to specify the custom parameter name. If your custom parameter name is "Customer Service Phone", then you can call it in the template like this:{% system customerPhone with name="客服电话" %}{{customerPhone}}Make sure thatnameThe value in the parameter is exactly the same as the custom parameter name you set in the background.

  3. Ask: Can I display the website name of another site in the template of a single site I have built with my Anq CMS?Yes, you can.systemTag supportsiteIdParameters allow you to specify the target site ID for the information to be retrieved. For example, if you want to display the website name of the site with ID 2 on the current site, you can use it like this:{% system otherSiteName with name="SiteName" siteId="2" %}{{otherSiteName}}This will allow you to flexibly share and display global configuration information across multiple site environments.

Related articles

How to generate and display a clear hierarchical breadcrumb navigation on the AnQiCMS page using the `breadcrumb` tag?

In website operations, a clear navigation path is crucial for improving user experience and search engine optimization (SEO).When we browse websites, a concise and clear path can help us quickly locate and understand our current position.

2025-11-07

How to flexibly construct and display the top, side, or bottom navigation menu of a website using the `navList` tag?

When building a fully functional website, a clear and intuitive navigation menu is undoubtedly one of the core elements of user experience.AnQiCMS provides a powerful and flexible `navList` tag, allowing users to easily create and manage the top, side, or bottom navigation menus of the website, meeting different layout and content display needs. ### `navList` Tag Basic Usage The `navList` tag is a key tool in the AnQiCMS template engine used to obtain the website navigation list.

2025-11-07

How to get and display the associated document list based on a specific tag of `tagDataList`?

In AnQi CMS, tags are not just an auxiliary tool for content management, but also a powerful tool for connecting different thematic content, enhancing the internal link structure of the website, and optimizing the user experience.When you want to display a list of all documents related to a specific tag on a specific page of the website, such as a special page, a tag cloud page, or the sidebar of a specific article, the `tagDataList` tag is your best choice.

2025-11-07

How does the `tagDetail` tag display the name, description, and other properties of a single tag?

In website content management, tags (Tag) play a multiple role in connecting content, optimizing user experience, and improving search engine visibility.A well-managed tag system not only helps visitors quickly locate the information they are interested in, but also conveys the structured information of the website content to search engines, thereby effectively improving SEO.AnQiCMS (AnQiCMS) fully understands the importance of tags and therefore provides a powerful and easy-to-use `tagDetail` tag, allowing you to flexibly obtain and display detailed information about individual tags.

2025-11-07

How to uniformly display the website's contact information, phone number, and email address with the `contact` tag?

How to efficiently manage and uniformly display a company's contact information, such as contacts, phone numbers, email addresses, and addresses, is a seemingly simple problem that often causes headaches.Imagine if this information were scattered across various pages of a website, and once an update is needed, you would have to search and modify each one individually. This is not only time-consuming and labor-intensive, but it is also prone to omissions or inconsistencies.Fortunately, AnQiCMS (AnQiCMS) provides an elegant solution - the `contact` tag, which helps us easily manage and flexibly display contact information.

2025-11-07

How to dynamically set and display the page's Title, Keywords, and Description using the `tdk` tag to optimize SEO?

How to make our content better discovered by search engines and attract more potential users is a continuous challenge in website operation.Among them, the Title (title), Keywords (keywords), and Description (description) these three TDK tags are like a series of 'business cards' on our website in the search engine results page, directly affecting the user's click intention and the understanding of the search engine.AnQi CMS knows this and therefore fully considered the dynamic setting of TDK and SEO friendliness in the initial system design.<h3>Importance of TDK

2025-11-07

How does the `archiveParams` tag display custom field data for AnQiCMS documents?

In AnQiCMS, the flexibility of website content is one of its highlights, which is attributed to its powerful content model custom field function.In addition to standard fields such as article title, content, and publication time, you can also add various custom fields according to business needs for different content models (such as articles, products), such as 'author', 'product model', 'house area', or 'service features'.These custom fields greatly enrich the expression of the website content, making it more closely aligned with practical application scenarios.So, when you tirelessly define and fill in these custom fields in the background

2025-11-07

How to build a dynamic filter using the `archiveFilters` tag to display documents that meet specific conditions?

How to help users quickly find the information they are interested in when managing a content-rich website, and improve the access experience, is a challenge that every content operator needs to face.AnQiCMS (AnQiCMS) understands this need and therefore provides a powerful `archiveFilters` tag, allowing you to easily build dynamic filters to provide flexible and diverse search methods for website content. Dynamic filter, as the name implies, is to automatically generate filtering conditions for users to choose from based on different attributes of the content.

2025-11-07