安企CMS#系统设置标签#

说明:用于获取系统配置信息

使用方法:{% system 变量名称 with name=“字段名称” %},变量名称不是必须的,设置了变量名称后,后续可以通过变量名称来调用,而不设置变量名称,则是直接输出结果。

system 支持的参数有

  • 站点ID siteId
    siteId 一般不需要填写,如果你使用后台的多站点管理创建了多个站点,并且想调用其他站点的数据,则可以通过指定 siteId 来实现调用指定站点的数据。

name 参数可用的字段名称有:

  • 网站名称 SiteName
  • 网站Logo SiteLogo
  • 网站备案号 SiteIcp
  • 版权内容 SiteCopyright
  • 网站首页地址 BaseUrl
  • 网站手机端地址 MobileUrl
  • 模板静态文件地址 TemplateUrl
  • 自定义参数 后台自定义设置的参数名

网站名称 SiteName

标签用法:{% system with name=“SiteName” %}

{# 默认用法 #}
<div>网站名称:{% system with name=“SiteName” %}</div>
{# 自定义名称调用 #}
&lt;div&gt;{\(<a href="/product/15399.html" data-anchor="10088">7</a>}名称:{% system siteName with name="SiteName" %}{{siteName}}&lt;/div&gt;
</code></pre><h3 id="content-dir-2"><strong data-anchor="16">网站</strong>Logo <code>SiteLogo</code></h3><p>标签用法:<code>{% system with name="SiteLogo" %}</code></p><pre><code>{# 默认用法 #}
&lt;img src="{% system with name="SiteLogo" %}" alt="{% system with name="SiteName" %}" /&gt;
{# 自定义名称调用 #}
&lt;img src="{% system siteLogo with name="SiteLogo" %}{{siteLogo}}" alt="{% system siteName with name="SiteName" %}{{siteName}}" /&gt;</code></pre><h3 id="content-dir-3"><strong data-anchor="16">网站</strong>备案号 <code>SiteIcp</code></h3><p>标签用法:<code>{% system with name="SiteIcp" %}</code></p><pre>{\)17}{# 默认用法 #}
&lt;p&gt;&lt;a href=”https://beian.miit.gov.cn/” rel=“nofollow” target=“_blank”&gt;{% system with name=“SiteIcp” %}&lt;/a&gt; ©2021 kandaoni.com. All Rights Reserved&lt;/p&gt;
{# 自定义名称调用 #}
&lt;p&gt;&lt;a href=”https://beian.miit.gov.cn/” rel=“nofollow” target=“_blank”&gt;{% system siteIcp with name=“SiteIcp” %}{{siteIcp}}&lt;/a&gt; ©2021 kandaoni.com. All Rights Reserved&lt;/p&gt;

版权内容 SiteCopyright

标签用法:{% system with name=“SiteCopyright” %}

{# 默认用法 #}
&lt;div&gt;{% system with name=“SiteCopyright” %}&lt;/div&gt;
{# 自定义名称调用 #}
&lt;div&gt;{% system siteCopyright with name=“SiteCopyright” %}{{siteCopyright|safe}}&lt;/div&gt;

网站首页地址 BaseUrl

标签用法:{% system with name=“BaseUrl” %}

{# 默认用法 #}
&lt;div&gt;首页地址:{% system with name=“BaseUrl” %}&lt;/div&gt;
{# 自定义名称调用 #}
&lt;div&gt;首页地址:{% system baseUrl with name=“BaseUrl” %}{{baseUrl|safe}}&lt;/div&gt;

网站手机端地址 MobileUrl

标签用法:{% system with name=“MobileUrl” %}

{# 默认用法 #}
&lt;div&gt;移动端地址:{% system with name=“MobileUrl” %}&lt;/div&gt;
{# 自定义名称调用 #}
&lt;div&gt;移动端地址:{% system mobileUrl with name=“MobileUrl” %}{{mobileUrl|safe}}&lt;/div&gt;

模板静态文件地址 TemplateUrl

标签用法:{% system with name=“TemplateUrl” %}

{# 默认用法 #}
&lt;link href=“{% system with name=“TemplateUrl” %}/css/style.css” rel=“stylesheet”&gt;
{# 自定义名称调用 #}
&lt;div&gt;静态文件地址:{% system templateUrl with name=“TemplateUrl” %}{{templateUrl|safe}}&lt;/div&gt;

上一篇: 没有了

下一篇: 安企CMS#联系方式标签#