Single Page Details Tag

Description: Used to get single-page detail data

Usage:{% pageDetail 变量名称 with name="字段名称" id="1" %}The variable name is not required. After setting the variable name, you can call it by the variable name later, or if the variable name is not set, the result is output directly.

Parameters supported by pageDetail:

  • Single-page IDid.idNot required, it will get the current page by default. If you need to specify a single page, you can achieve this by setting the id.
  • Single page URL aliastoken tokenNot required, the current single page will be fetched by default. If you need to specify a single page, you can do so by setting the id or token.
  • Site IDsiteId siteIdGenerally, 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 specifyingsiteIdTo implement the call to data from a specified site.

The fields available for the 'name' parameter are:

  • Single-page IDId
  • Single page titleTitle
  • Single page linkLink
  • Single Page DescriptionDescription
  • Single Page ContentContent
  • Single Page Thumbnail Large ImageLogo
  • Single Page ThumbnailThumb
  • Single Page Slideshow Group ImageImages

Single-page IDId

Tag Usage:{% pageDetail with name="Id" %}

{# 默认用法,自动获取当前页面单页 #}
<div>单页ID:{% pageDetail with name="Id" %}</div>
{# 获取指定单页id的单页字段 #}
<div>单页ID:{% pageDetail with name="Id" id="1" %}</div>
{# 自定义字段名称 #}
<div>单页ID:{% pageDetail pageId with name="Id" %}{{pageId}}</div>
<div>单页ID:{% pageDetail pageId with name="Id" id="1" %}{{pageId}}</div>

Single page titleTitle

Tag Usage:{% pageDetail with name="Title" %}

{# 默认用法,自动获取当前页面单页 #}
<div>单页标题:{% pageDetail with name="Title" %}</div>
{# 获取指定单页id的单页字段 #}
<div>单页标题:{% pageDetail with name="Title" id="1" %}</div>
{# 自定义字段名称 #}
<div>单页标题:{% pageDetail pageTitle with name="Title" %}{{pageTitle}}</div>
<div>单页标题:{% pageDetail pageTitle with name="Title" id="1" %}{{pageTitle}}</div>

Single page linkLink

Tag Usage:{% pageDetail with name="Link" %}

{# 默认用法,自动获取当前页面单页 #}
<div>单页链接:{% pageDetail with name="Link" %}</div>
{# 获取指定单页id的单页字段 #}
<div>单页链接:{% pageDetail with name="Link" id="1" %}</div>
{# 自定义字段名称 #}
<div>单页链接:{% pageDetail pageLink with name="Link" %}{{pageLink}}</div>
<div>单页链接:{% pageDetail pageLink with name="Link" id="1" %}{{pageLink}}</div>

Single Page DescriptionDescription

Tag Usage:{% pageDetail with name="Description" %}

{# 默认用法,自动获取当前页面单页 #}
<div>单页描述:{% pageDetail with name="Description" %}</div>
{# 获取指定单页id的单页字段 #}
<div>单页描述:{% pageDetail with name="Description" id="1" %}</div>
{# 自定义字段名称 #}
<div>单页描述:{% pageDetail pageDescription with name="Description" %}{{pageDescription}}</div>
<div>单页描述:{% pageDetail pageDescription with name="Description" id="1" %}{{pageDescription}}</div>

Single Page ContentContent

Tag Usage:{% pageDetail with name="Content" %}

The Content field will automatically convert content to html when the Markdown editor is enabled. After the Markdown editor is disabled, the Content content will not automatically convert to html. However, you can manually specify whether to perform the conversion, and you need to addrenderParameters. Acceptsfalse|trueTwo values.render=falseNo Markdown to html conversion is performed,render=trueConversion is performed.

{# 默认用法,自动获取当前页面单页 #}
<div>单页内容:{% pageDetail with name="Content" %}</div>
{# 获取指定单页id的单页字段 #}
<div>单页内容:{% pageDetail with name="Content" id="1" %}</div>
{# 自定义字段名称 #}
<div>单页内容:{% pageDetail pageContent with name="Content" %}{{pageContent|safe}}</div>
<div>单页内容:{% pageDetail pageContent with name="Content" id="1" %}{{pageContent|safe}}</div>

Single Page Thumbnail Large ImageLogo

Tag Usage:{% pageDetail with name="Logo" %}

{# 默认用法,自动获取当前页面分类 #}
<div>缩略图大图:<img src="{% pageDetail with name="Logo" %}" alt="{% pageDetail with name="Title" %}" /></div>
{# 获取指定分类id的分类字段 #}
<div>缩略图大图:<img src="{% pageDetail with name="Logo" id="1" %}" alt="{% pageDetail with name="Title" id="1" %}" /></div>
{# 自定义字段名称 #}
<div>缩略图大图:{% pageDetail pageLogo with name="Logo" %}<img src="{{pageLogo}}" alt="{% pageDetail with name="Title" %}" /></div>
<div>缩略图大图:{% pageDetail pageLogo with name="Logo" id="1" %}<img src="{{pageLogo}}" alt="{% pageDetail with name="Title" %}" /></div>

Single Page ThumbnailThumb

Tag Usage:{% pageDetail with name="Thumb" %}

{# 默认用法,自动获取当前页面分类 #}
<div>缩略图大图:<img src="{% pageDetail with name="Thumb" %}" alt="{% pageDetail with name="Title" %}" /></div>
{# 获取指定分类id的分类字段 #}
<div>缩略图大图:<img src="{% pageDetail with name="Thumb" id="1" %}" alt="{% pageDetail with name="Title" id="1" %}" /></div>
{# 自定义字段名称 #}
<div>缩略图大图:{% pageDetail pageThumb with name="Thumb" %}<img src="{{pageThumb}}" alt="{% pageDetail with name="Title" %}" /></div>
<div>缩略图大图:{% pageDetail pageThumb with name="Thumb" id="1" %}<img src="{{pageThumb}}" alt="{% pageDetail with name="Title" %}" /></div>

Single Page Slideshow Group ImageImages

Tag Usage:{% pageDetail pageImages with name="Images" %}{% for item in pageImages %}<img src="{{item}}" alt="{% pageDetail with name="Title" %}" />{% endfor %}

{% pageDetail pageImages with name="Images" %}
<ul>
{% for item in pageImages %}
  <li>
    <img src="{{item}}" alt="{% pageDetail with name="Title" %}" />
  </li>
{% endfor %}
</ul>