<@cms_site_property>
获取站点自定义属性数据列表,内嵌<#list DataList as prop>${prop.propName}</#list>遍历数据
| 属性名 | 类型 | 必填 | 可用值 | 描述 | 默认值 |
|---|---|---|---|---|---|
| page | BOOLEAN | 否 | true=是 false=否 | 是否分页获取数据 | false |
| size | INTEGER | 否 | (分页)数据条数,默认:10 | ||
| condition | STRING | 否 | 扩展sql条件语句,例如:title like 'a%' | ||
| siteid | INTEGER | 否 | 站点ID,默认从模板变量中获取${Site.siteId} | ||
| code | STRING | 否 | 属性编码 |
| 属性名 | 描述 | 类型 |
|---|---|---|
| propCode | 属性编码 | String |
| propName | 属性名称 | String |
| propValue | 属性值 | String |
| propertyId | ID | Long |
| siteId | 所属站点ID | Long |
使用场景:
<div class="block-column">
<h2 class="block-heading"><strong>商务合作,请您联系:</strong></h2>
<@cms_site_property siteid="${Site.siteId}" code="contact_bz">
<#list DataList as prop>
<p>${prop.propValue}</p>
</#list>
</@cms_site_property>
<h2 class="block-heading"><strong>市场合作,请您联系:</strong></h2>
<@cms_site_property siteid="${Site.siteId}" code="contact_market">
<#list DataList as prop>
<p>${prop.propValue}</p>
</#list>
</@cms_site_property>
<h2 class="block-heading"><strong>品牌广告合作,请您联系:</strong></h2>
<@cms_site_property siteid="${Site.siteId}" code="contact_ad">
<#list DataList as prop>
<p>${prop.propValue}</p>
</#list>
</@cms_site_property>
</div>