Description: Used to obtain document model detail data
Usage:{% moduleDetail 变量名称 with name="字段名称" id="1" %}The variable name is not required. After setting the variable name, it can be called later by the variable name, and if the variable name is not set, it is output directly.
The parameters supported by moduleDetail are:
- Model ID
id.idIt is not required, the current model will be obtained by default. If you need to specify a model, you can do so by setting id or token. - Model URL Alias
token.tokenIt is not required, the current model will be obtained by default. If you need to specify a model, you can do so by setting id or token. - Site ID
siteId.siteIdGenerally, it is not necessary to fill in, if you use the multi-site management on the backend to create multiple sites and want to call data from other sites, you can specifysiteIdTo call the data of the specified site.
The fields available for the name parameter are:
- Model ID
Id - Model title
Title - Model name
Name - Model keywords
Keywords - Model Introduction
Description - Model Link
Link - Model table name
TableName
Model IDId
Label usage:{% moduleDetail with name="Id" %}
{# 默认用法,自动获取当前页面模型 #}
<div>模型ID:{% moduleDetail with name="Id" %}</div>
{# 获取指定模型id的模型字段 #}
<div>模型ID:{% moduleDetail with name="Id" id="1" %}</div>
{# 自定义字段名称 #}
<div>模型ID:{% moduleDetail pageId with name="Id" %}{{pageId}}</div>
<div>模型ID:{% moduleDetail pageId with name="Id" id="1" %}{{pageId}}</div>
Model titleTitle
Label usage:{% moduleDetail with name="Title" %}
{# 默认用法,自动获取当前页面模型 #}
<div>模型标题:{% moduleDetail with name="Title" %}</div>
{# 获取指定模型id的模型字段 #}
<div>模型标题:{% moduleDetail with name="Title" id="1" %}</div>
{# 自定义字段名称 #}
<div>模型标题:{% moduleDetail pageTitle with name="Title" %}{{pageTitle}}</div>
<div>模型标题:{% moduleDetail pageTitle with name="Title" id="1" %}{{pageTitle}}</div>
Model LinkLink
Label usage:{% moduleDetail with name="Link" %}
{# 默认用法,自动获取当前页面模型 #}
<div>模型链接:{% moduleDetail with name="Link" %}</div>
{# 获取指定模型id的模型字段 #}
<div>模型链接:{% moduleDetail with name="Link" id="1" %}</div>
{# 自定义字段名称 #}
<div>模型链接:{% moduleDetail pageLink with name="Link" %}{{pageLink}}</div>
<div>模型链接:{% moduleDetail pageLink with name="Link" id="1" %}{{pageLink}}</div>
Model IntroductionDescription
Label usage:{% moduleDetail with name="Description" %}
{# 默认用法,自动获取当前页面模型 #}
<div>模型链接:{% moduleDetail with name="Description" %}</div>
{# 获取指定模型id的模型字段 #}
<div>模型链接:{% moduleDetail with name="Description" id="1" %}</div>
{# 自定义字段名称 #}
<div>模型链接:{% moduleDetail pageDescription with name="Description" %}{{pageDescription}}</div>
<div>模型链接:{% moduleDetail pageDescription with name="Description" id="1" %}{{pageDescription}}</div>