Description: Used to get system configuration information
Usage:{% system 变量名称 with name="字段名称" %}
The variable name is not required. After setting the variable name, it can be called by the variable name later. If the variable name is not set, the result is output directly.
Parameters supported by system:
- Site ID
siteId
siteId
Generally, it is not necessary to fill in. If you have created multiple sites using the multi-site management on the backend and want to call data from other sites, you can do so by specifyingsiteId
To implement the call to data from a specified site.
The field names available for the name parameter are:
- Website Name
SiteName
- Website Logo
SiteLogo
- Website Record Number
SiteIcp
- Copyright Content
SiteCopyright
- Website Home Address
BaseUrl
- Website Mobile End Address
MobileUrl
- Template Static Files Address
TemplateUrl
- Template Directory Name
TemplateName
- Shut down prompt content
SiteCloseTips
- Station language
Language
- Custom parameters
后台自定义设置的参数名
Website NameSiteName
Tag Usage:{% system with name="SiteName" %}
{# 默认用法 #}
<div>网站名称:{% system with name="SiteName" %}</div>
{# 自定义名称调用 #}
<div>网站名称:{% system siteName with name="SiteName" %}{{siteName}}</div>
Website LogoSiteLogo
Tag Usage:{% system with name="SiteLogo" %}
{# 默认用法 #}
<img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" />
{# 自定义名称调用 #}
<img src="{% system siteLogo with name="SiteLogo" %}{{siteLogo}}" alt="{% system siteName with name="SiteName" %}{{siteName}}" />
Website Record NumberSiteIcp
Tag Usage:{% system with name="SiteIcp" %}
{# 默认用法 #}
<p><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system with name="SiteIcp" %}</a> ©2021 kandaoni.com. All Rights Reserved</p>
{# 自定义名称调用 #}
<p><a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">{% system siteIcp with name="SiteIcp" %}{{siteIcp}}</a> ©2021 kandaoni.com. All Rights Reserved</p>
Copyright ContentSiteCopyright
Tag Usage:{% system with name="SiteCopyright" %}
{# 默认用法 #}
<div>{% system with name="SiteCopyright" %}</div>
{# 自定义名称调用 #}
<div>{% system siteCopyright with name="SiteCopyright" %}{{siteCopyright|safe}}</div>
Website Home AddressBaseUrl
Tag Usage:{% system with name="BaseUrl" %}
{# 默认用法 #}
<div>首页地址:{% system with name="BaseUrl" %}</div>
{# 自定义名称调用 #}
<div>首页地址:{% system baseUrl with name="BaseUrl" %}{{baseUrl|safe}}</div>
Website Mobile End AddressMobileUrl
Tag Usage:{% system with name="MobileUrl" %}
{# 默认用法 #}
<div>移动端地址:{% system with name="MobileUrl" %}</div>
{# 自定义名称调用 #}
<div>移动端地址:{% system mobileUrl with name="MobileUrl" %}{{mobileUrl|safe}}</div>
Template Static Files AddressTemplateUrl
Tag Usage:{% system with name="TemplateUrl" %}
{# 默认用法 #}
<link href="{% system with name="TemplateUrl" %}/css/style.css" rel="stylesheet">
{# 自定义名称调用 #}
<div>静态文件地址:{% system templateUrl with name="TemplateUrl" %}{{templateUrl|safe}}</div>
Station languageLanguage
Tag Usage:{% system with name="Language" %}
{# 默认用法 #}
<html lang="{% system with name='Language' %}">
Get current year tag
Tag Usage:{% now "2006" %}
The number 2006 following is a time formatting string, in the format supported by Golang.
仅仅显示年:
{% now "2006" %}
显示年月日
{% now "2006-01-02" %}
显示年月日时分秒
{% now "2006-01-02 15:04:05" %}