<@cms_content_closest>

Content tags for different sections of the article

Tag Name

<@cms_content_closest>

Tag Description

Tags for content in different sections. Only supports specifying the current section list for content. Tags can be used within the tags.${Data.title} Obtain data

Tag attributes

AttributeTypeRequiredAvailable valuesDescriptionDefault
pageBOOLEANNotrue = Yes
false = No
Do we need to paginate the data for retrieval?false
sizeINTEGERNo Pagination: Number of data entries, default: 10
conditionSTRINGNo Extend SQL conditional statements, for example: title like 'a%'
contentidINTEGERYes Content ID
typeSTRINGYesPrevious = Previous Article
Next = Next article
TypePrev
catalogidINTEGERNo Category ID
catalogaliasSTRINGNo Category Alias
levelSTRINGNoRoot=All Columns
Current = Current section
Child = Sub-column
CurrentAndChild = Current section and sub-sections
Data acquisition range, value:Root Ignored Attributes catalogid、catalogaliasCurrent
sortSTRINGNoRecent = Release time in descending order
Views = Number of views, ordered in descending order
Default = Sort field in descending order (default)
Sorting methodDefault
hasattributeSTRINGNo Contains content attributes. Multiple attributes should be separated by commas.
noattributeSTRINGNo Do not include content attributes. Multiple attributes should be separated by commas.
statusSTRINGNo Status: '-1' indicates no restrictions on status.
topflagBOOLEANNotrue = Yes
false = No
Whether to allow top-level statustrue

Tag data attributes

AttributeDescriptionType
attributesList of Content Attribute IdentifiersString[]
authorAuthor:String
catalogAncestorsParent IDs of CategoriesString
catalogIdCategory IDLong
commentCountNumber of comments (not real-time)Long
contentIdContent IDLong
contentTypeContent TypeString
contributorIdUser ID for submissionLong
createByCreatorString
createTimeCreation TimeLocalDateTime
deptCodeDepartment CodeString
deptIdDepartment IDLong
editorEditingString
favoriteCountNumber of favorites (not real-time)Long
imagesCover image listList<String>
keywordsKeywordsString[]
likeCountNumber of likes (not real-time)Long
linkContent linksString
linkFlagShould the content be linked?String
logoCover imageString
logoSrcCover image access pathString
originalOriginal content?String
prop1Backup Field 1String
prop2Backup Field 2String
prop3Backup Field 3String
prop4Backup Field 4String
publishDateRelease timeLocalDateTime
redirectUrlJumping LinksString
remarkNotes/CommentsString
seoDescriptionSEO DescriptionString
seoKeywordsSEO KeywordsString
seoTitleSEO TitleString
shortTitleShort TitleString
siteIdSite IDLong
sortFlagSorting valuesLong
sourceSourceString
sourceUrlSource URLString
statusContent StatusString
subTitleSubtitleString
summaryAbstractString
tagsTAGsString[]
titleTitleString
titleStyleShort TitleString
topCatalogTop-level category IDLong
topDateEnd time for keeping the top positionLocalDateTime
topFlagPin it badgeLong
updateByLast modified by:String
updateTimeLast modified timeLocalDateTime
viewCountNumber of articles viewed (not real-time)Long

Usage Examples

Content detail page: Get previous/next content

<!-- The attributes of the tags must be consistent with those of the content pagination data on the list page in order to obtain correct hierarchical information. -->
<@cms_content_closest contentid="${Content.contentId}" catalogid="${Content.catalogId}" type="Prev">
<#list DataList as prev>
Previous: <a href="${prev.link}">${prev.title}</a>
</#list>
</@cms_content_closest>
<@cms_content_closest contentid="${Content.contentId}" catalogid="${Content.catalogId}" type="Next">
<#list DataList as next>
Next: <a href="${next.link}">${next.title}</a>
</#list>
</@cms_content_closest>

On this page