<@cms_advertisement>
Obtain the advertisement data list, with the ` data embedded within it.<#list DataList as ad>${ad.name}</#list>Traverse data
| Attribute | Type | Required | Available values | Description | Default |
|---|---|---|---|---|---|
| page | BOOLEAN | No | true = Yes false = No | Do we need to paginate the data for retrieval? | false |
| size | INTEGER | No | Pagination: Number of data entries, default: 10 | ||
| condition | STRING | No | Extend SQL conditional statements, for example: title like 'a%' | ||
| code | STRING | Yes | Advertising code | ||
| type | STRING | No | None = Original link Stat = Statistical Link | Advertising Link Type | None |
| Attribute | Description | Type |
|---|---|---|
| adSpaceId | Ad position ID (Page component) | Long |
| advertisementId | Advertising ID | Long |
| createBy | Creator | String |
| createTime | Creation Time | LocalDateTime |
| keywords | Keywords | String |
| link | Actual redirect link (can be set as a intermediate address) | String |
| name | Name | String |
| offlineDate | Deactivation Time | LocalDateTime |
| onlineDate | Launch time | LocalDateTime |
| redirectUrl | Original redirect link | String |
| remark | Notes/Comments | String |
| resourcePath | Advertising material resource path | String |
| resourceSrc | Advertising material access address | String |
| state | Status | String |
| type | Type | String |
| weight | Weight | Integer |
PageWidget Variable, used to retrieve the configuration attributes of page components (advertisement positions).<@cms_advertisement code="${PageWidget.code}" size="3">
<#list DataList as ad>
<a href="${ad.link}">
<img src="${iurl(ad.resourcePath!'')}" alt="${ad.name}" />
</a>
</#list>
</@cms_advertisement>
PageWidget Variable.<@cms_advertisement code="index_ad" size="3">
<#list DataList as ad>
<a href="${ad.link}">
<img src="${iurl(ad.resourcePath!'')}" alt="${ad.name}" />
</a>
</#list>
</@cms_advertisement>