How to get and display website name, Logo, filing number and other system information in AnQi CMS template?

Calendar 👁️ 50

As an experienced security CMS website operator, I am well aware of the importance of efficiently obtaining and displaying website system information in templates.This concerns not only the user experience of the website, but also the foundation of SEO optimization and brand image building.AnQiCMS provides a simple and powerful template tag system, allowing developers and operators to easily present the core information of the website on the front page.

Get and display website system information in AnQi CMS template

In Anqi CMS, obtain and display core system information such as website name, Logo, filing number, etc., mainly through built-in{% system %}The tag is implemented. This tag is designed to unify the management and output of various site-level information configured in the background "Global Function Settings", ensuring data consistency and the convenience of template calls.

Get Website Name (SiteName)

The website name is a标志性 information of the website, commonly used in the suffix of page title, header or footer, etc. To obtain the website name, you can use it in the template.{% system %}tags, and specifynameparameters for"SiteName".

For example, the code to directly output the website name is as follows:

<title>{% tdk with name="Title" siteName=true %} | {% system with name="SiteName" %}</title>

In the above example, it is usually used in conjunction with the page TDK tags to build the complete page title. If you need to assign the website name to a variable for multiple references in the template, you can do it like this:

{% system siteName with name="SiteName" %}
<header>
    <h1>欢迎来到 {{ siteName }}</h1>
</header>

Get Website Logo (SiteLogo)

The website logo is the visual identity of the website, usually displayed in the header or footer in the form of an image. To obtain the URL of the website logo, the same method is used{% system %}tags, and specifynameparameters for"SiteLogo".

The following is how to use<img>An example of a website logo displayed in the tag:

<a href="/">
    <img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}">
</a>

To enhance SEO friendliness, it is recommended toaltFill in the website name in the attribute so that even if the image cannot be loaded, users and search engines can understand the meaning of the image.

Obtain the website record number (SiteIcp)

For websites operating in mainland China, displaying the filing number is a legal requirement, which is usually located at the footer of the website and linked to the Ministry of Industry and Information Technology filing query website. To obtain the filing number, please use{% system %}tags, and specifynameparameters for"SiteIcp".

The following is an example of how to display the filing number and add a link to it:

<footer>
    <p>
        <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a>
        &copy; {{ now "2006" }} {% system with name="SiteName" %}. All Rights Reserved.
    </p>
</footer>

In this example, we also combined{% now "2006" %}tags to dynamically display the current year, which is a common practice in copyright information.

Get copyright information (SiteCopyright)

The copyright information of the website is usually included in the footer, stating the ownership of the content. Through{% system %}label'snamethe parameter to"SiteCopyright"To get the copyright content configured by the backend.

If the copyright content may contain HTML tags, it needs to be used to render correctly.|safefilter.

<footer>
    <div>{% system siteCopyright with name="SiteCopyright" %}{{ siteCopyright|safe }}</div>
</footer>

To get other system information and custom parameters.

In addition to the above common information,{% system %}tags can also get other global configurations, such as:

  • Website Home Page Address (BaseUrl):{% system with name="BaseUrl" %}is often used to construct absolute links.
  • Website Mobile URL (MobileUrl):{% system with name="MobileUrl" %}Used in PC + mobile independent template mode.
  • Template Static File URL (TemplateUrl):{% system with name="TemplateUrl" %}Used to refer to the CSS, JS, and other static resources under the template directory.
<link href="{% system with name="TemplateUrl" %}/css/style.css" rel="stylesheet">
<a href="{% system with name="BaseUrl" %}">返回首页</a>

AnQiCMS also supports adding custom parameters in the background "Global Function Settings". These custom parameter names (Parameter Name) can be used directly asnameCall the value of the parameter. For example, if you add a custom parameter namedHelpUrlin the background, you can access it in the template like this:

{% system helpPageUrl with name="HelpUrl" %}
<a href="{{ helpPageUrl }}">帮助中心</a>

By these tags, operations personnel and template developers can flexibly and efficiently integrate the core information of the website into various template pages, maintaining the consistency and maintainability of the website information.


Frequently Asked Questions (FAQ)

1. Why did I use the tag in the template{% system %}but the content did not display on the website?

First, make sure you have filled in the corresponding information in the "Background Settings" -> "Global Feature Settings" on the Anqi CMS backend.For example, if you want to display the website logo, you need to upload the logo image on the backend first.{% system %}in the tag usednameIs the parameter spelled correctly, for exampleSiteName/SiteLogoThese parameters are case sensitive. If the problem persists, try clearing the system cache.

2. My website is a multi-site management mode, how to obtain the system information of a specified site?

Under the multi-site management mode of Anqi CMS,{% system %}The tag will default to obtaining the system information of the current visited site. If you need to specify obtaining the system information of a particular site, you can add{% system %}the tag withsiteIdparameters, for example{% system with name="SiteName" siteId="1" %}. Among them,"1"Replace with the actual ID of the target site. This is very useful when building cross-site links or displaying information.

3. I added custom parameters in the background "Global Feature Settings", how do I call them in the template?

Add custom parameters in the background "Global Feature Settings" where the "parameter name" can be used directly as{% system %}label'snameto call the parameter value. For example, if your custom parameter name isHotlineIt can be used in the template.{% system with name="Hotline" %}To get its value. Please note that the case of the parameter name should be consistent with the backend settings.

Related articles

How to install and manage multiple sites on a single server in AnQi CMS?

As an expert in Aqin CMS content management and website operation, I fully understand the value of efficient management of multiple sites.The multi-site management function of AnQi CMS is specifically designed to meet this core requirement, allowing for the management and operation of multiple independent websites on a single server with a streamlined and efficient architecture.This has greatly improved operational efficiency and effectively integrated resources. ### Understanding the Multi-Site Architecture of AnQi CMS AnQi CMS does not require the installation of a separate program for each website.

2025-11-06

How to configure the pseudo-static rules in AnqiCMS to optimize the website URL structure?

As an experienced person who deeply understands the operation of AnQiCMS, I know that an optimized URL structure is crucial for the long-term development of a website.It not only significantly improves the user experience, allowing visitors to clearly understand the website content, but also plays a core role in search engine optimization (SEO), directly affecting the ranking and visibility of the website in search results.The pseudo-static function of AnqiCMS is the important tool we use to achieve this goal.

2025-11-06

What search engines does AnqiCMS support for active link push function?

As a website operator who deeply understands the operation of AnQiCMS, I know that timely inclusion after content publication is crucial for website traffic and SEO performance.AnQiCMS provides powerful support in this field, especially its link push function, which can effectively shorten the time from publication to being discovered by search engines.### AnQiCMS Link Push Function Overview AnQiCMS's built-in link push function is an important part of its advanced SEO toolkit.

2025-11-06

How to optimize SEO for independent pages like "About Us" in the single-page management function of AnqiCMS?

As an experienced website operator familiar with AnQiCMS, I know that each independent page, such as 'About Us' and 'Contact Us', plays an indispensable role in the website structure and SEO strategy.These pages are not only the key windows for conveying brand information, core values, and contact information to visitors, but are also an important part of the search engine understanding the overall content and authority of the website.Even a seemingly simple standalone page can bring considerable traffic and better ranking performance to a website through careful SEO optimization.In AnQi CMS

2025-11-06

How to retrieve and loop output friend links in AnQi CMS template?

Managing and displaying friend links in Anqi CMS is an important task in website operation, it not only helps to improve the quality of external links on the website and enhance the search engine optimization performance, but also provides users with more valuable resources.As an experienced website operator proficient in AnQiCMS, I will explain in detail how to obtain and loop output the friend links in the AnQiCMS template.

2025-11-06

The AnqiCMS comment management feature, does it support liking and replying operations?

As an experienced security CMS website operation person, I know that content is the soul of the website, and user interaction is an important manifestation of the vitality of the content.AnQi CMS provides rich and powerful features in content management, among which comment management is a key link to build the community and enhance user stickiness.Today, I will elaborate on the comment management function of Anqi CMS to discuss whether it supports like and reply operations.

2025-11-06

How to use the pagination tag in the AnqiCMS template to implement pagination display of document lists?

As an experienced CMS website operation personnel of an information security company, I fully understand that how to effectively display content is the key to attracting and retaining users when building and maintaining a website.Especially for pages such as document lists that may contain a large amount of information, a reasonable pagination mechanism not only improves user experience but also optimizes website performance.Today, I will elaborate on how to use the pagination tag in AnqiCMS templates to implement pagination of document lists.

2025-11-06

How to flexibly use the `if`, `for` and other logical judgment and loop tags in AnqiCMS template development?

As a professional deeply familiar with AnqiCMS operations, I know that template development is the core link in building a website with attractive appearance and complete functions.During the process of content creation, editing, and publishing, flexibly using logical judgments and loop tags in template languages can make our website content dynamically presented and adaptable to diverse business scenarios, thereby better meeting the needs of readers and improving user experience.Today, let's delve into the flexible application of logical tags such as `if`, `for`, and others in AnqiCMS template development.

2025-11-06