Directives (Namespace: api)

Directives (Namespace: cms)

Directives (Namespace: log)

Directives (Namespace: sys)

Directives (Namespace: task)

Directives (Namespace: tools)

Directives (Namespace: trade)

Directives (Namespace: visit)

Methods

PublicCMS Function Directive Manual 202506

appClient Client Registration Interface

Parameter List

  • uuid: Device unique ID
  • clientVersion: Client version

Usage Example

<script>
$.getJSON('${site.dynamicPath}api/appClient?uuid=1&clientVersion=1.0&appToken=Interface access authorization Token', function(data){
});
</script>
 
appToken Interface Access Authorization Token Acquisition Interface

Parameter List

  • appKey: Application key
  • appSecret: Application secret

Return Result

  • appToken: Interface access authorization Token
  • expiryDate: Expiration date
  • error: Error message, returns "secretError" when appKey or appSecret is empty or incorrect

Usage Example

<script>
$.getJSON('${site.dynamicPath}api/appToken?appKey=1&appSecret=1', function(data){
  $('article p em').text(data.clicks);
});
</script>
 
autoLogin Auto Login Interface

Parameter List

  • uuid: Device unique ID
  • username: Username
  • channel: Login channel

Return Result

  • result: Login result, ["true","false"]
  • authToken: User login authorization
  • expiryDate: Expiration date
  • user: User information
    • id : ID
    • name : Username
    • weakPassword : Weak password
    • nickname : Nickname
    • cover : Cover image
    • deptId : Department ID
    • contentPermissions : Content permissions (0:self,1:all,2:dept)
    • roles : Role IDs
    • email : Email address
    • emailChecked : Verified email
    • superuser : Administrator
    • disabled : Disabled
    • lastLoginDate : Last login date
    • lastLoginIp : Last login IP
    • loginCount : Login count
    • registeredDate : Registration date
    • updateDate : Update date

Usage Example

<script>
$.getJSON('${site.dynamicPath}api/autoLogin?uuid=1&username=admin&channel=web', function(data){
    console.log(result+","+authToken+","+user.nickname+","+expiryDate);
});
</script>
 
bindingUser Client User Binding Interface

Parameter List

  • uuid: Device unique ID
  • channel: Client version

Return Result

  • result: Binding result

Usage Example

<script>
$.getJSON('${site.dynamicPath}api/bindingUser?uuid=1&channel=web&authToken=User login authorization&authUserId=1', function(data){
console.log(data.result);
});
</script>
 
clearCache Cache Clear Interface

Usage Example

  <script>
   $.getJSON('${site.dynamicPath}api/clearCache&appToken=Interface access authorization Token', function(data){
     console.log("ok");
   });
   </script>
 
contentCheck Content Review Interface

Parameter List

  • ids: Multiple content IDs
  • uncheck: Cancel review, ["true","false"], default is false

Return Result

    Usage Example

    <script>
    $.getJSON('${site.dynamicPath!}api/contentCheck?ids=1,2&authToken=User login authorization&authUserId=1&appToken=Interface access authorization Token', function(data){
    });
    </script>
     
    contentClick Content Click Interface

    Parameter List

    • id: Content ID

    Return Result

    • clicks: Content click count

    Usage Example

    <script>
    $.getJSON('${site.dynamicPath}api/contentClick?id=1', function(data){
      console.log(data.clicks);
    });
    </script>
     
    contentCreate Content Creation Interface

    Parameter List

    • id: Content ID, creates new content when empty
    • categoryId: Category ID
    • modelId: Model ID
    • title: Title
    • description: Description
    • author: Author
    • editor: Editor
    • copied: Repost, ["true","false"], default is false
    • publishDate: Publish date, defaults to current date
    • tagNames: Multiple tag names
    • tagIds: Multiple tag IDs
    • url: URL, valid when model is external link
    • checked: Reviewed, ["true","false"], default is false
    • extendData: Extended data map
    • source: Source
    • sourceUrl: Source URL
    • text: Main text HTML
    • draft: Draft, valid when checked is false, ["true","false"], default is false
    • parentId: Parent ID, valid when model is child model
    • filePaths: Multiple file paths
    • fileDescriptions: Multiple file descriptions
    • imagePaths: Multiple image paths
    • imageDescriptions: Multiple image descriptions

    Return Result

    • result: Result ["failed","success"]
    • contentId: Content ID, valid when result is "success"
    • error: Error, valid when result is "failed"

    Usage Example

    <script>
    $.getJSON('${site.dynamicPath!}api/contentCreate?categoryId=1&modelId=article&title=title&text=%3Cdiv%3Econtent%3C/div%3E&extendData.field1=value1&extendData.field2=value2&authToken=User login authorization&authUserId=1&appToken=Interface access authorization Token', function(data){
    console.log(data.result);
    });
    </script>
     
    login Login Interface

    Parameter List

    • username: Device unique ID
    • password: Username
    • encoding: Password encryption method
    • channel: Login channel

    Return Result

    • result: Login result, ["true","false"]
    • authToken: User login authorization
    • expiryDate: Expiration date
    • user: User information
      • id : ID
      • name : Username
      • weakPassword : Weak password
      • nickname : Nickname
      • cover : Cover image
      • deptId : Department ID
      • contentPermissions : Content permissions (0:self,1:all,2:dept)
      • roles : Role IDs
      • email : Email address
      • emailChecked : Verified email
      • superuser : Administrator
      • disabled : Disabled
      • lastLoginDate : Last login date
      • lastLoginIp : Last login IP
      • loginCount : Login count
      • registeredDate : Registration date
      • updateDate : Update date

    Usage Example

    <script>
    $.getJSON('${site.dynamicPath}api/login?username=admin&password=sha512encodingpassword&encoding=sha512&channel=web', function(data){
        console.log(result+","+authToken+","+user.nickname+","+expiryDate);
    });
    </script>
     
    myContentList My Content Interface

    Parameter List

    • categoryId: Category ID, effective when parentId is empty
    • containChild: Whether to include child categories, 【true, false】
    • categoryIds: Multiple category IDs, effective when categoryId is empty
    • modelId: Multiple model IDs
    • parentId: Parent content ID
    • onlyUrl: External link, 【true, false】
    • hasImages: Has image list, 【true, false】
    • hasFiles: Has attachment list, 【true, false】
    • hasProducts: Has product list, 【true, false】
    • startPublishDate: Start publish date, 【2020-01-01 23:59:59】, 【2020-01-01】
    • endPublishDate: End publish date, cannot exceed the current time when advanced options are disabled, 【2020-01-01 23:59:59】, 【2020-01-01】
    • status: Content status, 【0: Draft, 1: Published, 2: Pending, 3: Rejected】
    • emptyParent: Advanced option: Whether the parent content ID is empty, 【true, false】, effective when parentId is empty
    • orderField: Sorting field, 【score: Rating, comments: Comment count, clicks: Click count, publishDate: Publish date, updateDate: Update date, checkDate: Review date】, defaults to top-level descending order, publish date sorted by orderType
    • orderType: Sorting type, 【asc: Ascending, desc: Descending】, defaults to descending
    • pageIndex: Page number
    • pageSize: Number of items per page

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE: Default number of items per page
      • MAX_PAGE_SIZE: Maximum number of items per page
      • totalCount: Total count
      • pageSize: Number of items per page
      • firstResult: First result offset, current starting position
      • pageIndex: Current page index
      • totalPage: Total number of pages
      • list: Result list
    • page.list: List type, query result entity list
      • id: ID
      • title: Title
      • userId: User ID of the publisher
      • deptId: Department ID of the publisher
      • checkUserId: Reviewer user ID
      • categoryId: Category ID
      • modelId: Model ID
      • parentId: Parent content ID
      • quoteContentId: Quoted content ID
      • copied: Reposted
      • author: Author
      • editor: Editor
      • onlyUrl: External link
      • hasImages: Has image list
      • hasFiles: Has attachment list
      • hasProducts: Has product list
      • hasStatic: Staticized
      • url: Link address
      • description: Description
      • tagIds: Multiple tag IDs
      • cover: Cover image
      • childs: Number of child contents
      • scores: Total scores
      • scoreUsers: Number of users who rated
      • score: Score
      • comments: Comment count
      • clicks: Click count
      • collections: Collection count
      • publishDate: Publish date
      • expiryDate: Expiry date
      • checkDate: Review date
      • updateUserId: User ID of the updater
      • updateDate: Update date
      • createDate: Creation date
      • sort: Top-level priority
      • status: Status (0: Draft, 1: Published, 2: Pending, 3: Rejected)

    Usage Example

    <script>
    $.getJSON('${site.dynamicPath!}api/myContentList?pageSize=10&authToken=User login authorization&authUserId=1', function(data){
        console.log(data.page.totalCount);
    });
    </script>
     
    refreshToken Refresh appToken interface

    Parameter List

    • appToken: Device unique ID

    Return Result

    • authToken: User login authorization
    • expiryDate: Expiry date
    • error: Error message 【needNotRefresh】

    Usage Example

    <script>
    $.getJSON('${site.dynamicPath}api/login?appToken=Interface access authorization Token', function(data){
        console.log(appToken+","+expiryDate);
    });
    </script>
     
    unBindingUser Client binding user interface

    Parameter List

    • uuid: Device unique ID
    • channel: Client version

    Return Result

    • result: Unbinding result

    Usage Example

    <script>
    $.getJSON('${site.dynamicPath}api/unBindingUser?uuid=1&channel=web&authToken=User login authorization&authUserId=1', function(data){
    console.log(data.result);
    });
    </script>
     
    upload Upload interface

    Authentication Headers

    • appToken: Application authorization Token
    • authToken: User login Token
    • authUserId: User ID

    Parameter List

    • file: File
    • base64File: Base64 encoded string of the file, effective when the file is empty
    • originalFilename: Original filename, required when uploading via base64
    • privatefile: Whether the file is private

    Return Result

    • result: Upload result, 【true, false】
    • error: Error reason code
    • fileName: File path
    • fileType: File type
    • fileSize: File size

    Usage Example

    <script>
    $('input[type=file]').change(function() {
        var formData = new FormData();
        var file = this.files[0];
        formData.append('file', file);
        $.ajax({url:'${site.dynamicPath}api/upload',type:'post',headers: {'appToken': 'your app token','':'','':''},data: formData,, success:function(data){
            console.log(result+","+error+","+fileName);
        });
    });
    </script>
     
    category Category query directive

    Parameter List

    • id: Category ID, returns object
      • id: ID
      • name: Name
      • parentId: Parent ID
      • typeId: Category type ID
      • childIds: Child category IDs
      • tagTypeIds: Tag type IDs
      • code: Code
      • customPath: Custom access path
      • onlyUrl: External link
      • hasStatic: Has static file
      • url: Link address
      • customContentPath: Custom content access path
      • containChild: Include child category content
      • pageSize: Content page size
      • allowContribute: Allow contributions
      • sort: Sort
      • hidden: Hidden on frontend
      • workflowId: Workflow
    • code: Category code, effective when ID is empty, returns object
    • absoluteURL: Process URL as absolute path, defaults to true
    • containsAttribute: Defaults to false, when true, object.attribute is category extended data map (field code, value)
    • ids: Multiple category IDs, comma or space separated, effective when ID or code is empty, returns map (ID, object)

    Usage Example

    <@cms.category id=1>${object.name}</@cms.category>

    <@cms.category ids=1,2,3><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.category>

       <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/category?id=1', function(data){
          console.log(data.name);
        });
        </script>
     
    categoryList Category list query directive

    Parameter List

    • parentId: Parent category ID
    • typeId: Category type ID
    • absoluteURL: Process URL as absolute path, defaults to true
    • queryAll: Query all, 【true, false】, effective when parentId is empty
    • advanced: Enable advanced options, defaults to false
    • containsAttribute: Defaults to true, when true, category.attribute is category extended data map (field code, value)
    • disabled: Advanced option: Disabled status, defaults to false
    • hidden: Advanced option: Hidden, 【true, false】
    • pageIndex: Page number
    • pageSize: Number of items per page

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE: Default number of items per page
      • MAX_PAGE_SIZE: Maximum number of items per page
      • totalCount: Total count
      • pageSize: Number of items per page
      • firstResult: First result offset, current starting position
      • pageIndex: Current page index
      • totalPage: Total number of pages
      • list: Result list
    • page.list: List type, query result entity list, sorted by ID in descending order
      • id: ID
      • name: Name
      • parentId: Parent ID
      • typeId: Category type ID
      • childIds: Child category IDs
      • tagTypeIds: Tag type IDs
      • code: Code
      • customPath: Custom access path
      • onlyUrl: External link
      • hasStatic: Has static file
      • url: Link address
      • customContentPath: Custom content access path
      • containChild: Include child category content
      • pageSize: Content page size
      • allowContribute: Allow contributions
      • sort: Sort
      • hidden: Hidden on frontend
      • workflowId: Workflow

    Usage Example

    <@cms.categoryList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.categoryList>

       <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/categoryList?pageSize=10', function(data){
          console.log(data.page.totalCount);
        });
        </script>
     
    categoryModel Category content model mapping query directive

    Parameter List

    • categoryId: Category ID, returns object
      • id: ID
      • customContentPath: Custom content access path
      • templatePath: Template path
      • contentPath: Content path
    • modelId: Content model ID, effective when ID is empty, returns object
    • modelIds: Multiple content model IDs, effective when categoryId exists and modelId is empty, returns map (content model ID, object)
    • categoryIds: Multiple category IDs, effective when categoryId does not exist and modelId exists, returns map (category ID, object)

    Usage Example

    <@cms.categoryModel categoryId=1 modelId='article'>${object.templatePath}</@cms.categoryModel>

    <@cms.categoryModel categoryIds=1,2,3 modelId='article'><#list map as k,v>${k}:${v.templatePath}<#sep>,</#list></@cms.categoryModel>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/categoryModel?categoryId=1&modelId=article', function(data){
         console.log(data.templatePath);
       });
       </script>
     
    categoryModelList Category model mapping list query directive

    Parameter List

    • modelId: Content model ID
    • categoryId: Category ID

    Return Result

    • list: List type, query result entity list
      • id: ID
      • customContentPath: Custom content access path
      • templatePath: Template path
      • contentPath: Content path

    Usage Example

    <@cms.categoryModelList modelId='article'><#list list as a>${a.templatePath}<#sep>,</#list></@cms.categoryModelList>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/categoryModelList?modelId=article', function(data){
         console.log(data[0].totalCount);
       });
       </script>
     
    categoryType Category type query directive

    Parameter List

    • id: Category ID, returns object
      • id: ID
      • name: Name
      • onlyUrl: External link
      • sort: Sort
      • templatePath: Static template path
      • path: Access path
      • containChild: Include child category content
      • pageSize: Page size
      • extendList: Extended field list
    • ids: Multiple category IDs, comma or space separated, effective when ID or code is empty, returns map (ID, object)

    Usage Example

    <@cms.categoryType id=1>${object.name}</@cms.categoryType>

    <@cms.categoryType ids=1,2,3><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.categoryType>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/categoryType?id=banner', function(data){
         console.log(data.name);
       });
       </script>
     
    categoryTypeList Category type list query directive

    No parameters available for query, this directive returns all results by default, no pagination

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE: Default number of items per page
      • MAX_PAGE_SIZE: Maximum number of items per page
      • totalCount: Total count
      • pageSize: Number of items per page
      • firstResult: First result offset, current starting position
      • pageIndex: Current page index
      • totalPage: Total number of pages
      • list: Result list
    • page.list: List type, query result entity list
      • id: ID
      • name: Name
      • onlyUrl: External link
      • sort: Sort
      • templatePath: Static template path
      • path: Access path
      • containChild: Include child category content
      • pageSize: Page size
      • extendList: Extended field list

    Usage Example

    <@cms.categoryTypeList><#list page.list as a>${a.name}<#sep>,</#list></@cms.categoryTypeList>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/categoryTypeList', function(data){
         console.log(data.page.totalCount);
       });
       </script>
     
    comment Comment query directive

    Parameter List

    • replaceSensitive: Replace sensitive words, defaults to true
    • id: Comment ID, returns object
      • id: ID
      • userId: User ID of the publisher
      • replyId: Reply comment ID
      • replyUserId: Reply user ID
      • replies: Number of replies
      • scores: Scores
      • contentId: Content ID
      • ip: IP
      • checkUserId: Reviewer user
      • checkDate: Review date
      • updateDate: Update date
      • createDate: Creation date
      • status: Status (1: Published, 2: Pending)
    • ids: Multiple comment IDs, comma or space separated, effective when ID is empty, returns map (ID, object)

    Usage Example

    <@cms.comment id=1>${object.text}</@cms.comment>

    <@cms.comment ids=1,2,3><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.comment>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/comment?id=1&appToken=Interface access authorization Token', function(data){
         console.log(data.text);
       });
       </script>
     
    commentList Comment list query directive

    Parameter List

    • userId: User ID of the comment publisher
    • replyId: Reply comment ID
    • contentId: Content ID
    • emptyReply: Whether reply ID is empty, effective when replyId is empty, defaults to false
    • replyUserId: Reply user ID
    • replaceSensitive: Replace sensitive words, defaults to true
    • advanced: Enable advanced options, defaults to false
    • status: Advanced option: Comment status, 【1: Published, 2: Pending】
    • checkUserId: Advanced option: Reviewer user ID
    • disabled: Advanced option: Comment deleted, 【true, false】
    • orderField: Sorting field, 【replies: Reply count, scores: Rating, checkDate: Review date, updateDate: Update date, createDate: Creation date】, defaults to top-level ID sorted by orderType
    • orderType: Sorting type, 【asc: Ascending, desc: Descending】, defaults to descending
    • pageIndex: Page number
    • pageSize: Number of items per page

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE: Default number of items per page
      • MAX_PAGE_SIZE: Maximum number of items per page
      • totalCount: Total count
      • pageSize: Number of items per page
      • firstResult: First result offset, current starting position
      • pageIndex: Current page index
      • totalPage: Total number of pages
      • list: Result list
    • page.list: List type, query result entity list
      • id: ID
      • userId: User ID of the publisher
      • replyId: Reply comment ID
      • replyUserId: Reply user ID
      • replies: Number of replies
      • scores: Scores
      • contentId: Content ID
      • ip: IP
      • checkUserId: Reviewer user
      • checkDate: Review date
      • updateDate: Update date
      • createDate: Creation date
      • status: Status (1: Published, 2: Pending)

    Usage Example

    <@cms.commentList contentId=1 pageSize=10><#list page.list as a>${a.text}<#sep>,</#list></@cms.commentList>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/commentList?contentId=1&pageSize=10&appToken=Interface access authorization Token', function(data){
         console.log(data.page.totalCount);
       });
       </script>
     
    content Content query directive

    Parameter List

    • id Content ID, returns object
      • id : ID
      • title : Title
      • userId : User ID (Publisher)
      • deptId : Department ID (Publisher)
      • checkUserId : Reviewer User ID
      • categoryId : Category ID
      • modelId : Model ID
      • parentId : Parent Content ID
      • quoteContentId : Quoted Content ID
      • copied : Copied (Repost)
      • author : Author
      • editor : Editor
      • onlyUrl : External Link
      • hasImages : Has Image List
      • hasFiles : Has Attachment List
      • hasProducts : Has Product List
      • hasStatic : Staticized
      • url : URL
      • description : Description
      • tagIds : Tag IDs (Multiple)
      • cover : Cover Image
      • childs : Child Content Count
      • scores : Total Scores
      • scoreUsers : Score User Count
      • score : Score
      • comments : Comment Count
      • clicks : Click Count
      • collections : Collection Count
      • publishDate : Publish Date
      • expiryDate : Expiry Date
      • checkDate : Review Date
      • updateUserId : Update User ID
      • updateDate : Update Date
      • createDate : Creation Date
      • sort : Top Level (Sticky)
      • status : Status (0:Draft,1:Published,2:Pending,3:Rejected)
    • absoluteURL: Convert URL to absolute path. Default is true
    • absoluteId: Convert ID to referenced content ID. Default is true
    • containsAttribute: Default is false. For HTTP requests, when true, object.attribute is the content extended data map (field code, value)
    • ids: Multiple content IDs, separated by commas or spaces. Takes effect when ID is empty. Returns map (ID, object)

    Usage Example

    <@cms.content id=1>${object.title}</@cms.content>

    <@cms.content ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.content>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/content?id=1', function(data){
         console.log(data.title);
       });
       </script>
     
    categoryFileList Content Attachment List Query Directive

    Parameter List

    • fileTypes: File types, 【image: Image, video: Video, audio: Audio, other: Other】
    • image: Whether it is an image. Takes effect when fileTypes is empty, 【true, false】
    • contentId: Content ID
    • userId: User ID
    • absoluteURL: Convert URL to absolute path. Default is true
    • orderField: Sorting field, 【size: File size, clicks: Click count】. Default is ascending order by ID.
    • orderType: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.
    • pageIndex: Page number
    • pageSize: Items per page

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE : Default items per page
      • MAX_PAGE_SIZE : Maximum items per page
      • totalCount : Total count
      • pageSize : Items per page
      • firstResult : Current starting position
      • pageIndex : Current page
      • totalPage : Total pages
      • list : Result list
    • page.list: List type, query result entity list
      • id : ID
      • contentId : Content ID
      • userId : Upload User ID
      • filepath : File Path
      • fileType : File Type
      • fileSize : File Size
      • width : Width
      • height : Height
      • clicks : Clicks
      • sort : Sort
      • description : Description

    Usage Example

    <@cms.contentFileList contentId=1 pageSize=10><#list page.list as a>${a.filePath}<#sep>,</#list></@cms.contentFileList>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/contentFileList?contentId=1&pageSize=10', function(data){
         console.log(data.page.totalCount);
       });
       </script>
     
    contentList Content List Query Directive

    Parameter List

    • categoryId: Category ID. Takes effect when parentId is empty.
    • containChild: Include child categories, 【true, false】
    • categoryIds: Multiple category IDs. Takes effect when categoryId is empty.
    • modelId: Multiple model IDs
    • parentId: Parent content ID
    • onlyUrl: External link, 【true, false】
    • hasImages: Has image list, 【true, false】
    • hasFiles: Has attachment list, 【true, false】
    • hasProducts: Has product list, 【true, false】
    • hasCover: Has cover image, 【true, false】
    • userId: Publisher user ID
    • startPublishDate: Start publish date, 【2020-01-01 23:59:59】, 【2020-01-01】
    • endPublishDate: End publish date. Cannot exceed current time when advanced options are disabled, 【2020-01-01 23:59:59】, 【2020-01-01】
    • advanced: Enable advanced options. Default is false
    • status: Advanced option: Content status, 【0: Draft, 1: Published, 2: Pending, 3: Rejected】
    • disabled: Advanced option: Disabled status. Default is false
    • emptyParent: Advanced option: Whether parent content ID is empty, 【true, false】. Takes effect when parentId is empty.
    • title: Advanced option: Title
    • absoluteURL: Convert URL to absolute path. Default is true
    • absoluteId: Convert ID to referenced content ID. Default is true
    • containsAttribute: Default is false. For HTTP requests, when true, content.attribute is the content extended data map (field code, value)
    • orderField: Sorting field, 【score: Score, comments: Comment count, clicks: Click count, collections: Collection count, publishDate: Publish date, updateDate: Update date, checkDate: Review date】. Default is descending by sticky level and publish date.
    • orderType: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.
    • firstResult: Starting position, starting from 1
    • pageIndex: Page number. Takes effect when firstResult is not provided.
    • pageSize: Items per page
    • maxResults: Maximum results count

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE : Default items per page
      • MAX_PAGE_SIZE : Maximum items per page
      • totalCount : Total count
      • pageSize : Items per page
      • firstResult : Current starting position
      • pageIndex : Current page
      • totalPage : Total pages
      • list : Result list
    • page.list: List type, query result entity list
      • id : ID
      • title : Title
      • userId : User ID (Publisher)
      • deptId : Department ID (Publisher)
      • checkUserId : Reviewer User ID
      • categoryId : Category ID
      • modelId : Model ID
      • parentId : Parent Content ID
      • quoteContentId : Quoted Content ID
      • copied : Copied (Repost)
      • author : Author
      • editor : Editor
      • onlyUrl : External Link
      • hasImages : Has Image List
      • hasFiles : Has Attachment List
      • hasProducts : Has Product List
      • hasStatic : Staticized
      • url : URL
      • description : Description
      • tagIds : Tag IDs (Multiple)
      • cover : Cover Image
      • childs : Child Content Count
      • scores : Total Scores
      • scoreUsers : Score User Count
      • score : Score
      • comments : Comment Count
      • clicks : Click Count
      • collections : Collection Count
      • publishDate : Publish Date
      • expiryDate : Expiry Date
      • checkDate : Review Date
      • updateUserId : Update User ID
      • updateDate : Update Date
      • createDate : Creation Date
      • sort : Top Level (Sticky)
      • status : Status (0:Draft,1:Published,2:Pending,3:Rejected)
    Usage Example

    <@cms.contentList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentList>

      <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/contentList?pageSize=10', function(data){
          console.log(data.page.totalCount);
        });
        </script>
     
    contentProduct Product Query Directive

    Parameter List

    • id: Content ID, returns object
      • id : ID
      • contentId : Content
      • userId : Upload User ID
      • cover : Cover
      • title : Title
      • price : Price
      • minQuantity : Minimum Quantity
      • maxQuantity : Maximum Quantity
      • inventory : Inventory
      • sales : Sales
    • absoluteURL: Convert cover to absolute path. Default is true
    • ids: Multiple content IDs, separated by commas or spaces. Takes effect when ID is empty. Returns map (ID, object)

    Usage Example

    <@cms.contentProduct id=1>${object.title}</@cms.contentProduct>

    <@cms.contentProduct ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.contentProduct>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/contentProduct?id=1', function(data){
         console.log(data.title);
       });
       </script>
     
    contentProductList Product List Query Directive

    Parameter List

    • contentId: Content ID
    • userId: Product publisher user ID
    • title: Title
    • startPrice: Start price
    • endPrice: End price
    • absoluteURL: Convert cover to absolute path. Default is true
    • orderField: Sorting field, 【price: Price, inventory: Stock, sales: Sales volume】. Default is ID sorted by orderType.
    • orderType: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.
    • pageIndex: Page number
    • pageSize: Items per page

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE : Default items per page
      • MAX_PAGE_SIZE : Maximum items per page
      • totalCount : Total count
      • pageSize : Items per page
      • firstResult : Current starting position
      • pageIndex : Current page
      • totalPage : Total pages
      • list : Result list
    • page.list: List type, query result entity list
      • id : ID
      • contentId : Content
      • userId : Upload User ID
      • cover : Cover
      • title : Title
      • price : Price
      • minQuantity : Minimum Quantity
      • maxQuantity : Maximum Quantity
      • inventory : Inventory
      • sales : Sales

    Usage Example

    <@cms.contentProductList contentId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentProductList>

     <script>
      $.getJSON('${site.dynamicPath}api/directive/cms/contentProductList?contentId=1&pageSize=10', function(data){
        console.log(data.page.totalCount);
      });
      </script>
     
    contentQuoteList Content Quote List Query Directive

    Parameter List

    • quoteId: Quoted content ID

    Return Result

    • list: List type, query result entity list
      • id : ID
      • title : Title
      • userId : User ID (Publisher)
      • deptId : Department ID (Publisher)
      • checkUserId : Reviewer User ID
      • categoryId : Category ID
      • modelId : Model ID
      • parentId : Parent Content ID
      • quoteContentId : Quoted Content ID
      • copied : Copied (Repost)
      • author : Author
      • editor : Editor
      • onlyUrl : External Link
      • hasImages : Has Image List
      • hasFiles : Has Attachment List
      • hasProducts : Has Product List
      • hasStatic : Staticized
      • url : URL
      • description : Description
      • tagIds : Tag IDs (Multiple)
      • cover : Cover Image
      • childs : Child Content Count
      • scores : Total Scores
      • scoreUsers : Score User Count
      • score : Score
      • comments : Comment Count
      • clicks : Click Count
      • collections : Collection Count
      • publishDate : Publish Date
      • expiryDate : Expiry Date
      • checkDate : Review Date
      • updateUserId : Update User ID
      • updateDate : Update Date
      • createDate : Creation Date
      • sort : Top Level (Sticky)
      • status : Status (0:Draft,1:Published,2:Pending,3:Rejected)

    Usage Example

    <@cms.contentQuoteList contentId=1 pageSize=10><#list list as a>${a.title}<#sep>,</#list></@cms.contentQuoteList>

     <script>
      $.getJSON('${site.dynamicPath}api/directive/cms/contentQuoteList?contentId=1', function(data){
        console.log(data);
      });
      </script>
     
    contentRelatedList Content Recommendation List Query Directive

    Parameter List

    • contentId: Content ID
    • relatedContentId: Recommended content ID
    • relationType: Relation type
    • relation: Relation
    • orderField: Sorting field, 【clicks: Click count】. Default is ascending by ID.
    • orderType: Sorting type, 【asc: Ascending, desc: Descending】. Default is descending.
    • pageIndex: Page number
    • pageSize: Items per page

    Return Result

    • page:
      • DEFAULT_PAGE_SIZE : Default items per page
      • MAX_PAGE_SIZE : Maximum items per page
      • totalCount : Total count
      • pageSize : Items per page
      • firstResult : Current starting position
      • pageIndex : Current page
      • totalPage : Total pages
      • list : Result list
    • page.list: List type, query result entity list
      • id : ID
      • contentId : Content ID
      • relationType : Relation type
      • relation : Relation
      • relatedContentId : Recommended content ID
      • userId : Recommended user ID
      • url : URL
      • title : Title
      • description : Description
      • sort : Sorting

    Usage Example

    <@cms.contentRelatedList contentId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.contentRelatedList>

     <script>
      $.getJSON('${site.dynamicPath}api/directive/cms/contentRelatedList?contentId=1&pageSize=10', function(data){
        console.log(data.page.totalCount);
      });
      </script>
     
    dictionary Data Dictionary Query Directive

    Parameter List

    • id: Value, returns object
      • name : Name
      • childDepth : Child depth
    • ids: Multiple values, separated by commas or spaces. Takes effect when ID is empty. Returns map (ID, object)

    Usage Example

    <@cms.dictionary id='data'>${object.name}</@cms.dictionary>

    <@cms.dictionary values='data,data2'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.dictionary>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/dictionary?dictionaryId=data&value=1', function(data){
         console.log(data.name);
       });
       </script>
     
    dictionaryData Data Dictionary Data Query Directive

    Parameter List

    • dictionaryId: Data dictionary ID
    • value: Value, returns object
      • parentValue : Parent value
      • text : Text
      • sort : Sort
    • values: Multiple values, separated by commas or spaces. Takes effect when value is empty. Returns map (ID, object)

    Usage Example

    <@cms.dictionaryData dictionaryId='data' value='1'>${object.text}</@cms.dictionaryData>

    <@cms.dictionaryData dictionaryId values='1,2,3'><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.dictionaryData>

      <script>
       $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryData?dictionaryId=data&value=1', function(data){
         console.log(data.text);
       });
       </script>
     
    dictionaryDataList Data Dictionary Data List

    Parameter List

    • dictionaryId: Dictionary ID. Returns empty result if empty.
    • parentValue: Parent node value

    Return Result

    • list: List type, query result entity list
      • parentValue : Parent value
      • text : Text
      • sort : Sort

    Usage Example

    <@cms.dictionaryDataList dictionaryId='data'><#list list as a>${a.text}<#sep>,</#list></@cms.dictionaryDataList>

    <script>
     $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryDataList?dictionaryId=1&parentValue=text', function(data){
       console.log(data);
     });
     </script>
     
    dictionaryExclude Data Dictionary Exclusion Rule Query Directive

    Parameter List

    • dictionaryId: Data dictionary ID
    • excludeDictionaryId: Excluded dictionary, returns object
      • excludeDictionaryIds: Multiple excluded dictionaries, separated by commas or spaces. Takes effect when excludeDictionaryId is empty. Returns map (id, object)

      Usage Example

      <@cms.dictionaryExclude dictionaryId='data' excludeDictionaryId='data1'>${object.id.excludeDictionaryId}</@cms.dictionaryExclude>

      <@cms.dictionaryExclude dictionaryId='data' excludeDictionaryIds='data1,data2'><#list map as k,v>${k}:${v.id.excludeDictionaryId}<#sep>,</#list></@cms.dictionaryExclude>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExclude?dictionaryId=data&value=1', function(data){
           console.log(data.id.excludeDictionaryId);
         });
         </script>
       
      dictionaryExcludeList Data Dictionary Data List

      Parameter List

      • dictionaryId: Dictionary ID
      • excludeDictionaryId: Excluded data dictionary ID

      Return Result

      • list: List type, query result entity list

        Usage Example

        <@cms.dictionaryExcludeList dictionaryId='data'><#list list as a>${a.id.excludeDictionaryId}<#sep>,</#list></@cms.dictionaryExcludeList>

        <script>
        $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExcludeList?dictionaryId=1&parentValue=text', function(data){
          console.log(data);
        });
        </script>
         
        dictionaryExcludeValue Data Dictionary Excluded Value Query Directive

        Parameter List

        • dictionaryId: Data dictionary ID
        • excludeDictionaryId: Excluded dictionary
        • value: Dictionary value, returns object
          • excludeValues: Excluded values
        • values: Multiple dictionary values, separated by commas or spaces. Takes effect when value is empty. Returns map (id, object)

        Usage Example

        <@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' value='data1'>${object.excludeValues}</@cms.dictionaryExcludeValue>

        <@cms.dictionaryExcludeValue dictionaryId='data' excludeDictionaryId='data1' values='1,2'><#list map as k,v>${k}:${v.excludeValues}<#sep>,</#list></@cms.dictionaryExcludeValue>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryExcludeValue?dictionaryId=data&excludeDictionaryId=data1&value=1', function(data){
             console.log(data.excludeValues);
           });
           </script>
         
        dictionaryList Data Dictionary List

        Parameter List

        • name: Dictionary name
        • pageIndex: Page number
        • pageSize: Items per page

        Return Result

        • page:
          • DEFAULT_PAGE_SIZE: Default items per page
          • MAX_PAGE_SIZE: Maximum items per page
          • totalCount: Total count
          • pageSize: Items per page
          • firstResult: Current starting position
          • pageIndex: Current page
          • totalPage: Total pages
          • list: Result list
        • page.list: List type, query result entity list
          • name: Name
          • childDepth: Child depth

        Usage Example

        <@cms.dictionaryList name='data'><#list page.list as a>${a.name}<#sep>,</#list></@cms.dictionaryList>

        <script>
         $.getJSON('${site.dynamicPath}api/directive/cms/dictionaryList?name=data', function(data){
           console.log(data.page.totalCount);
         });
         </script>
         
        editorHistory Content History Query Directive

        Parameter List

        • id: ID, returns object
          • id: ID
          • itemType: Item type
          • itemId: Item ID
          • fieldName: Field name
          • createDate: Creation date
          • userId: User
          • text: Content text
        • ids: Multiple IDs, separated by commas or spaces. Takes effect when id is empty. Returns map (id, object)

        Usage Example

        <@cms.editorHistory id=1>${object.text}</@cms.editorHistory>

        <@cms.editorHistory ids=1,2,3><#list map as k,v>${k}:${v.text}<#sep>,</#list></@cms.editorHistory>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/editorHistory?id=1&appToken=Access Authorization Token', function(data){
             console.log(data.text);
           });
           </script>
         
        editorHistoryList Content History List Query Directive

        Parameter List

        • itemType: Item type
        • itemId: Item ID
        • fieldName: Field name
        • userId: User ID
        • orderType: Sort type, [asc: ascending, desc: descending], default is publish date descending
        • pageIndex: Page number
        • pageSize: Items per page

        Return Result

        • page:
          • DEFAULT_PAGE_SIZE: Default items per page
          • MAX_PAGE_SIZE: Maximum items per page
          • totalCount: Total count
          • pageSize: Items per page
          • firstResult: Current starting position
          • pageIndex: Current page
          • totalPage: Total pages
          • list: Result list
        • page.list: List type, query result entity list
          • id: ID
          • itemType: Item type
          • itemId: Item ID
          • fieldName: Field name
          • createDate: Creation date
          • userId: User
          • text: Content text

        Usage Example

        <@cms.editorHistoryList contentId=1 fieldName='text' pageSize=10><#list page.list as a>${a.text}<#sep>,</#list></@cms.editorHistoryList>

         <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/editorHistoryList?contentId=1&fieldName='text'&pageSize=10&appToken=Access Authorization Token', function(data){
            console.log(data.page.totalCount);
          });
          </script>
         
        facetSearch Content List Query Directive

        Parameter List

          Return Result

          • page: Faceted search result
            • facetMap: Faceted search result (field, (value, count))
          • page.list: List type, query result entity list
            • id: ID
            • title: Title
            • userId: Publishing user ID
            • deptId: Publishing user department ID
            • checkUserId: Review user ID
            • categoryId: Category ID
            • modelId: Model ID
            • parentId: Parent content ID
            • quoteContentId: Quoted content ID
            • copied: Reposted
            • author: Author
            • editor: Editor
            • onlyUrl: External link
            • hasImages: Has image list
            • hasFiles: Has attachment list
            • hasProducts: Has product list
            • hasStatic: Has static file
            • url: URL
            • description: Description
            • tagIds: Multiple tag IDs
            • cover: Cover image
            • childs: Child content count
            • scores: Total scores
            • scoreUsers: Rating user count
            • score: Score
            • comments: Comment count
            • clicks: Click count
            • collections: Collection count
            • publishDate: Publish date
            • expiryDate: Expiry date
            • checkDate: Review date
            • updateUserId: Update user ID
            • updateDate: Update date
            • createDate: Creation date
            • sort: Top level
            • status: Status (0: Draft, 1: Published, 2: Pending, 3: Rejected)

          Usage Example

            <@cms.facetSearch word='cms' pageSize=10>
            <p> category: <#list page.facetMap.categoryId as k,v><@cms.category id=k>${object.name}</@cms.category>(${v})</#list></p>
            <p> model: <#list page.facetMap.modelId as k,v><@cms.model id=k>${object.name}</@cms.model>(${v})</#list></p>
            <#list page.list as a><p>${a.title}</p></#list>
            </@cms.facetSearch>
           
            <script>
             $.getJSON('${site.dynamicPath}api/directive/cms/facetSearch?word=cms&pageSize=10', function(data){
               console.log(data.page.totalCount);
             });
             </script>
           
          model Page Fragment Data Query Directive

          Parameter List

          • id: Content model ID, returns object
            • id: ID
            • parentId: Parent ID
            • name: Name
            • searchableModel: Searchable model
            • templatePath: Static template path
            • contentPath: Content path
            • editorType: Editor type
            • coverWidth: Cover width
            • coverHeight: Cover height
            • hasChild: Has child
            • onlyUrl: Extend link
            • hasImages: Has image list
            • hasFiles: Has file list
            • hasProducts: Has product list
            • searchable: Text searchable
            • fieldList: Field list
            • requiredFieldList: Required field list
            • fieldTextMap: Field text map
            • extendList: Extend field list
            • relatedList: Related list
          • ids: Multiple content model IDs, separated by commas or spaces. Takes effect when id is empty. Returns map (id, object)

          Usage Example

          <@cms.model id='article'>${object.name}</@cms.model>

          <@cms.model ids='article,link,picture'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.model>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/cms/model?id=article', function(data){
               console.log(data.name);
             });
             </script>
           
          modelList Content Model List Query Directive

          Parameter List

          • parentId: Parent content model ID
          • queryAll: Query all models, takes effect when parentId is empty. [true, false], default is false
          • hasChild: Has child model, [true, false]
          • onlyUrl: External link, [true, false]
          • hasImages: Has image list, [true, false]
          • hasFiles: Has file list, [true, false]

          Return Result

          • list: List type, query result entity list
            • id: ID
            • parentId: Parent ID
            • name: Name
            • searchableModel: Searchable model
            • templatePath: Static template path
            • contentPath: Content path
            • editorType: Editor type
            • coverWidth: Cover width
            • coverHeight: Cover height
            • hasChild: Has child
            • onlyUrl: Extend link
            • hasImages: Has image list
            • hasFiles: Has file list
            • hasProducts: Has product list
            • searchable: Text searchable
            • fieldList: Field list
            • requiredFieldList: Required field list
            • fieldTextMap: Field text map
            • extendList: Extend field list
            • relatedList: Related list

          Usage Example

          <@cms.modelList><#list page.list as a>${a.name}<#sep>,</#list></@cms.modelList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/cms/modelList', function(data){
              console.log(data.page.totalCount);
            });
            </script>
           
          place Recommended Position Query Directive

          Parameter List

          • id: Recommended position ID, returns object
            • id: ID
            • path: Recommended position path
            • userId: Creation user ID
            • checkUserId: Review user ID
            • itemType: Item type
            • itemId: Item ID
            • title: Title
            • url: URL
            • description: Description
            • cover: Cover image
            • createDate: Creation date
            • publishDate: Publish date
            • expiryDate: Expiry date
            • status: Status (0: Draft, 1: Published, 2: Pending)
            • clicks: Click count
            • maxClicks: Maximum click count
            • updateDate: Update date
          • absoluteURL: Process URL as absolute path, default is true
          • containsAttribute: Default is false. When true, object.attribute is the recommended position extended data map (field code, value)
          • ids: Multiple recommended position IDs, separated by commas or spaces. Takes effect when id is empty. Returns map (id, object)

          Usage Example

          <@cms.place id=1>${object.title}</@cms.place>

          <@cms.place ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.place>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/cms/place?id=1&appToken=Access Authorization Token', function(data){
              console.log(data.title);
            });
            </script>
           
          placeList Recommended Position List Query Directive

          Parameter List

          • path: Page fragment path
          • userId: Publishing user ID
          • advanced: Enable advanced options, default is false
          • status: Advanced option: Data status, [0: Operation, 1: Published, 2: Pending]
          • disabled: Advanced option: Disabled status, default is false
          • startPublishDate: Start publish date, [2020-01-01 23:59:59], [2020-01-01]
          • endPublishDate: End publish date, cannot exceed current time when advanced option is disabled, [2020-01-01 23:59:59], [2020-01-01]
          • itemType: Item type, [content: Content, category: Category, custom: Custom]
          • itemId: Item ID
          • absoluteURL: Process URL and cover image as absolute path, default is true
          • containsAttribute: Default is false. For HTTP requests, it is an advanced option. When true, place.attribute is the recommended position extended data map (field code, value)
          • orderField: Sort field, [createDate: Creation date, clicks: Click count], default is publish date sorted by orderType
          • orderType: Sort type, [asc: ascending, desc: descending], default is descending
          • pageIndex: Page number
          • pageSize: Items per page

          Return Result

          • page:
            • DEFAULT_PAGE_SIZE: Default items per page
            • MAX_PAGE_SIZE: Maximum items per page
            • totalCount: Total count
            • pageSize: Items per page
            • firstResult: Current starting position
            • pageIndex: Current page
            • totalPage: Total pages
            • list: Result list
          • page.list: List type, query result entity list
            • id: ID
            • path: Recommended position path
            • userId: Creation user ID
            • checkUserId: Review user ID
            • itemType: Item type
            • itemId: Item ID
            • title: Title
            • url: URL
            • description: Description
            • cover: Cover image
            • createDate: Creation date
            • publishDate: Publish date
            • expiryDate: Expiry date
            • status: Status (0: Draft, 1: Published, 2: Pending)
            • clicks: Click count
            • maxClicks: Maximum click count
            • updateDate: Update date

          Usage Example

          <@cms.placeList path='/1.html' pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.placeList>

           <script>
            $.getJSON('${site.dynamicPath}api/directive/cms/placeList?path=/1.html&pageSize=10&appToken=Access Authorization Token', function(data){
              console.log(data.page.totalCount);
            });
            </script>
           
          search Content List Query Directive

          Parameter List

          • word: Search term, returns union results for multiple terms
          • exclude: Exclusion terms
          • tagIds: Multiple tag IDs, returns union results for multiple tags
          • userId: User ID
          • parentId: Parent content ID
          • categoryId: Category ID
          • containChild: Include sub-categories, effective when categoryId is not empty
          • categoryIds: Multiple category IDs, effective when categoryId is empty
          • modelIds: Multiple model IDs
          • extendsValues Multiple full-text search field values, format: [field code]:[field value], e.g.: extendsValues='isbn:value1,unicode:value2'
          • dictionaryValues Multiple dictionary search field values, includes all child results when parent value is used, format: [field code]_[field value], e.g.: dictionaryValues='extend1_value1,extend1_value2'
          • dictionaryUnion Return union results for dictionary values, effective when dictionaryUnion is not empty, [true,false], defaults to intersection results
          • highlight: Highlight keywords, [true,false], defaults to false. When enabled, title, author, editor, and description fields should add ?no_esc to enable HTML highlighting. CMS automatically escapes HTML for security.
          • preTag: Highlight prefix, effective when highlighting is enabled, defaults to "<B>"
          • postTag: Highlight suffix, effective when highlighting is enabled, defaults to "</B>"
          • projection: Project results, [true,false], defaults to false
          • phrase: Exact search, [true,false], defaults to false
          • fields: Search fields, [title:title, author:author, editor:editor, description:description, text:content,files:attachments]
          • containsAttributeDefaults to false, advanced option for HTTP requests. When true, content.attribute contains content extension data map (field code, value)
          • startPublishDate: Start publish date, ["2000-01-01 23:59:59"], ["2000-01-01"]
          • endPublishDate: End publish date, ["2000-01-01 23:59:59"], ["2000-01-01"]
          • orderField Sort field, [clicks:click count descending,score:score descending,publishDate:publish date descending,collections:collection count descending,minPrice:minimum price,maxPrice:maximum price,extend.sort1-extend.sort10]:extension field sort flags], defaults to relevance descending
          • pageIndex: Page number
          • pageSize: Items per page
          • maxResults: Maximum results count

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : total count
            • pageSize : items per page
            • firstResult : first result offset
            • pageIndex : current page number
            • totalPage : total pages
            • list : result list
          • page.list:List type query result entities
            • id : id
            • title : title
            • userId : publisher user ID
            • deptId : publisher department ID
            • checkUserId : reviewer user ID
            • categoryId : category ID
            • modelId : model ID
            • parentId : parent content ID
            • quoteContentId : referenced content ID
            • copied : reposted
            • author : author
            • editor : editor
            • onlyUrl : external link
            • hasImages : has image list
            • hasFiles : has attachment list
            • hasProducts : has product list
            • hasStatic : has static file
            • url : URL
            • description : description
            • tagIds : multiple tag IDs
            • cover : cover image
            • childs : child content count
            • scores : total score
            • scoreUsers : scoring user count
            • score : score
            • comments : comment count
            • clicks : click count
            • collections : collection count
            • publishDate : publish date
            • expiryDate : expiry date
            • checkDate : review date
            • updateUserId : updater user ID
            • updateDate : update date
            • createDate : creation date
            • sort : top level
            • status : status(0:Draft,1:Published,2:Pending,3:Rejected)
          Usage Example

          <@cms.search word='cms' pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.search>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/cms/search?word=cms&pageSize=10', function(data){
              console.log(data.page.totalCount);
            });
            </script>
           
          survey Survey Questionnaire Query Directive

          Parameter List

          • id:Survey ID, returns object
            • id : id
            • userId : publisher user ID
            • surveyType : survey type(survey,exam)
            • title : title
            • description : description
            • votes : vote count
            • startDate : start date
            • endDate : end date
            • allowAnonymous : allow anonymous
            • createDate : creation date
          • ids: Multiple survey IDs, comma or space separated, returns map(id,object) when id is empty

          Usage Example

          <@cms.survey id=1>${object.title}</@cms.survey>

          <@cms.survey ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.survey>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/survey?id=1', function(data){
             console.log(data.title);
           });
           </script>
           
          surveyList Survey List Query Directive

          Parameter List

          • userId: Publisher user ID
          • surveyType: Survey type, [exam: exam, survey: survey]
          • startStartDate: Start date range begin, ["2020-01-01 23:59:59"], ["2020-01-01"]
          • endStartDate: Start date range end, ["2020-01-01 23:59:59"], ["2020-01-01"]
          • startEndDate: End date range begin, ["2020-01-01 23:59:59"], ["2020-01-01"]
          • endEndDate: End date range end, ["2020-01-01 23:59:59"], ["2020-01-01"]
          • title: Title
          • disabled: Disabled status, defaults to false
          • orderField Sort field, [votes: participant count, startDate: start date, endDate: end date, createTime: creation date], defaults to ID sorted by orderType
          • orderType: Sort type, [asc: ascending, desc: descending], defaults to descending
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • userId : Publisher user ID
            • surveyType : Survey type(survey,exam)
            • title : Title
            • description : Description
            • votes : Vote count
            • startDate : Start date
            • endDate : End date
            • allowAnonymous : Allow anonymous
            • createDate : Creation date

          Usage Example

          <@cms.surveyList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyList>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/surveyList?pageSize=10', function(data){
             console.log(data.page.totalCount);
           });
           </script>
           
          surveyQuestion Survey Question Query Directive

          Parameter List

          • id: Survey question ID, returns object
            • id : ID
            • surveyId : Survey ID
            • title : Title
            • score : Score
            • questionType : Question type[radio,select,checkbox,text,file,picture]
            • cover : Image
            • answer : Answer
            • sort : Sort order
          • ids: Multiple survey question IDs, comma or space separated, returns map(id,object) when id is empty
          • absoluteURL: Convert cover image to absolute path, defaults to true
          • advanced: Enable advanced options, defaults to false

          Usage Example

          <@cms.surveyQuestion id=1>${object.title}</@cms.surveyQuestion>

          <@cms.surveyQuestion ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.surveyQuestion>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestion?id=1&appToken=Access Token', function(data){
             console.log(data.title);
           });
           </script>
           
          surveyQuestionItem Survey Question Option Query Directive

          Parameter List

          • id: Survey question ID, returns object
            • id : ID
            • questionId : Question ID
            • votes : Vote count
            • title : Title
            • sort : Sort order
          • ids: Multiple survey question IDs, comma or space separated, returns map(id,object) when id is empty

          Usage Example

          <@cms.surveyQuestionItem id=1>${object.title}</@cms.surveyQuestionItem>

          <@cms.surveyQuestionItem ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.surveyQuestionItem>

          <script>
           $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionItem?id=1', function(data){
             console.log(data.title);
           });
           </script>
           
          surveyQuestionItemList Survey Question Option List Query Directive

          Parameter List

          • questionId: Question ID
          • orderField: Sort field, [votes: vote count], defaults to sort by order
          • orderType: Sort type, [asc: ascending, desc: descending], defaults to descending
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • questionId : Question ID
            • votes : Vote count
            • title : Title
            • sort : Sort order

          Usage Example

          <@cms.surveyQuestionItemList questionId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyQuestionItemList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionItemList?questionId=1&pageSize=10', function(data){
            console.log(data.page.totalCount);
          });
          </script>
           
          surveyQuestionList Survey Question List Query Directive

          Parameter List

          • surveyId: Survey ID
          • questionTypes Multiple question types, [radio: single choice,select: dropdown,checkbox: multiple choice,text: text,file: file,picture: picture]
          • absoluteURL: Convert cover image to absolute path, defaults to true
          • advanced: Enable advanced options, defaults to false
          • orderType: Sort type, [asc: ascending, desc: descending], defaults to sort order
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • surveyId : Survey ID
            • title : Title
            • score : Score
            • questionType : Question type[radio,select,checkbox,text,file,picture]
            • cover : Image
            • answer : Answer
            • sort : Sort order

          Usage Example

          <@cms.surveyQuestionList surveyId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.surveyQuestionList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/surveyQuestionList?surveyId=1&pageSize=10', function(data){
            console.log(data.page.totalCount);
          });
          </script>
           
          tag Tag Query Directive

          Parameter List

          • id: Tag ID, returns object
            • id : ID
            • name : Name
            • typeId : Type ID
            • searchCount : Search count
          • ids: Multiple tag IDs, comma or space separated, returns map(id,object) when id is empty

          Usage Example

          <@cms.tag id=1>${object.name}</@cms.tag>

          <@cms.tag ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.tag>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/tag?id=1', function(data){
            console.log(data.name);
          });
          </script>
           
          tagList Tag List Query Directive

          Parameter List

          • typeId: Tag type ID
          • name: Tag name
          • advanced: Enable advanced options, defaults to false
          • orderField: Advanced option: Sort field, [searchCount: search count], defaults to searchCount sorted by orderType
          • orderType: Sort type, [asc: ascending, desc: descending], defaults to descending
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • name : Name
            • typeId : Type ID
            • searchCount : Search count

          Usage Example

          <@cms.tagList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.tagList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/tagList?pageSize=10', function(data){
            console.log(data.page.totalCount);
          });
          </script>
           
          tagType Tag Type Query Directive

          Parameter List

          • id: Tag type ID, returns object
            • id : ID
            • name : Name
            • count : Tag count
          • ids: Multiple tag type IDs, comma or space separated, returns map(id,object) when id is empty

          Usage Example

          <@cms.tagType id=1>${object.name}</@cms.tagType>

          <@cms.tagType ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.tagType>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/tagType?id=1', function(data){
            console.log(data.name);
          });
          </script>
           
          tagTypeList Tag Type List Query Directive

          Parameter List

          • name: Tag name
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • name : Name
            • count : Tag count

          Usage Example

          <@cms.tagTypeList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.tagTypeList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/tagTypeList?pageSize=10', function(data){
           console.log(data.page.totalCount);
          });
          </script>
           
          userCollection User Collection Query Directive

          Parameter List

          • userId: User ID
          • contentId: Content ID, returns object
            • id : ID
            • createDate : Creation date
          • contentIds: Multiple item IDs, comma or space separated, returns map(contentId,object) when contentId is empty

          Usage Example

          <@cms.userCollection userId=1 contentId=1>${object.scores}</@cms.userCollection>

          <@cms.userCollection userId=1 contentIds='1,2,3'><#list map as k,v>${k}:${v.contentId}<#sep>,</#list></@cms.userCollection>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userCollection?id=1', function(data){
            console.log(data.scores);
          });
          </script>
           
          userCollectionList User Rating List Query Directive

          Parameter List

          • userId: User ID
          • contentId: Content ID
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • createDate : Creation date

          Usage Example

          <@cms.userCollectionList userId=1 pageSize=10><#list page.list as a>${a.scores}<#sep>,</#list></@cms.userCollectionList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userCollectionList?userId=1&pageSize=10', function(data){
           console.log(data.page.totalCount);
          });
          </script>
           
          userScore User Rating Query Directive

          Parameter List

          • userId: User ID
          • itemType: Item type
          • itemId: Item ID, returns object
            • id : ID
            • score : Score
            • ip : IP
            • createDate : Creation date
          • itemIds: Multiple item IDs, comma or space separated, returns map(itemId,object) when itemId is empty

          Usage Example

          <@cms.userScore userId=1 itemType="content" itemId=1>${object.scores}</@cms.userScore>

          <@cms.userScore userId=1 itemType="content" itemIds='1,2,3'><#list map as k,v>${k}:${v.scores}<#sep>,</#list></@cms.userScore>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userScore?id=1', function(data){
            console.log(data.scores);
          });
          </script>
           
          userScoreList User Rating List Query Directive

          Parameter List

          • userId: User ID
          • itemType: Item type
          • itemId: Item ID
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • score : Score
            • ip : IP
            • createDate : Creation date

          Usage Example

          <@cms.userScoreList userId=1 pageSize=10><#list page.list as a>${a.scores}<#sep>,</#list></@cms.userScoreList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userScoreList?userId=1&pageSize=10', function(data){
           console.log(data.page.totalCount);
          });
          </script>
           
          userSurvey User Survey Response Query Directive

          Parameter List

          • userId: User ID
          • surveyId: Survey ID, returns object
            • id : ID
            • anonymous : Anonymous user
            • score : Score
            • ip : IP
            • createDate : Creation date
          • surveyIds: Multiple survey IDs, comma or space separated, returns map(surveyId,object) when surveyId is empty and userId is not empty
          • userIds: Multiple user IDs, comma or space separated, returns map(userId,object) when userId is empty and surveyId is not empty

          Usage Example

          <@cms.userSurvey id=1>${object.score}</@cms.userSurvey>

          <@cms.userSurvey ids='1,2,3'><#list map as k,v>${k}:${v.score}<#sep>,</#list></@cms.userSurvey>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userSurvey?id=1&appToken=Access Token', function(data){
            console.log(data.score);
          });
          </script>
           
          userSurveyList User Survey Response List Query Directive

          Parameter List

          • userId: User ID
          • surveyId: Survey ID
          • orderField: Sort field, [score: rating, createDate: creation date], defaults to createDate sorted by orderType
          • orderType: Sort type, [asc: ascending, desc: descending], defaults to descending
          • pageIndex: Page number
          • pageSize: Items per page

          Return Results

          • page:
            • DEFAULT_PAGE_SIZE : Default items per page
            • MAX_PAGE_SIZE : Maximum items per page
            • totalCount : Total count
            • pageSize : Items per page
            • firstResult : First result offset
            • pageIndex : Current page number
            • totalPage : Total pages
            • list : Result list
          • page.list: List type query result entities
            • id : ID
            • anonymous : Anonymous user
            • score : Score
            • ip : IP
            • createDate : Creation date

          Usage Example

          <@cms.userSurveyList userId=1 pageSize=10><#list page.list as a>${a.score}<#sep>,</#list></@cms.userSurveyList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyList?userId=1&pageSize=10&appToken=Access Token', function(data){
           console.log(data.page.totalCount);
          });
          </script>
           
          userSurveyQuestion User Survey Question Answer Query Directive

          Parameter List

          • userId: User ID
          • questionId: Question ID, returns object
            • id : ID
            • surveyId : Survey ID
            • answer : Answer
            • score : Score
            • createDate : Creation Date
          • questionIds: Multiple question IDs, comma or space separated. Takes effect when questionId is empty and userId is not empty. Returns map(questionId,object)
          • userIds: Multiple user IDs, comma or space separated. Takes effect when userId is empty and questionId is not empty. Returns map(userId,object)

          Usage Example

          <@cms.userSurveyQuestion id=1>${object.answer}</@cms.userSurveyQuestion>

          <@cms.userSurveyQuestion ids='1,2,3'><#list map as k,v>${k}:${v.answer}<#sep>,</#list></@cms.userSurveyQuestion>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyQuestion?id=1&appToken=Interface Access Authorization Token', function(data){
            console.log(data.answer);
          });
          </script>
           
          userSurveyQuestionList User Survey Question Answer List Query Directive

          Parameter List

          • userId: User ID
          • questionId: Question ID
          • surveyId: Survey ID
          • orderField: Sorting field, [score: Score, createDate: Creation Date], default is createDate sorted by orderType
          • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
          • pageIndex: Page number
          • pageSize: Number of items per page

          Return Result

          • page:
            • DEFAULT_PAGE_SIZE: Default number of items per page
            • MAX_PAGE_SIZE: Maximum number of items per page
            • totalCount: Total count
            • pageSize: Number of items per page
            • firstResult: First result offset, current starting position
            • pageIndex: Current page index
            • totalPage: Total number of pages
            • list: Result list
          • page.list: List type, query result entity list
            • id: ID
            • surveyId: Survey ID
            • answer: Answer
            • score: Score
            • createDate: Creation Date

          Usage Example

          <@cms.userSurveyQuestionList userId=1 pageSize=10><#list page.list as a>${a.answer}<#sep>,</#list></@cms.userSurveyQuestionList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userSurveyQuestionList?userId=1&pageSize=10&appToken=Interface Access Authorization Token', function(data){
           console.log(data.page.totalCount);
          });
          </script>
           
          userVote User Vote Query Directive

          Parameter List

          • userId: User ID
          • voteId: Vote ID, returns object
            • id: ID
            • anonymous: Anonymous user
            • itemId: Option ID
            • ip: IP
            • createDate: Creation Date
          • voteIds: Multiple vote IDs, separated by commas or spaces, takes effect when voteId is empty, returns map(voteId, object)

          Usage Example

          <@cms.userVote id=1>${object.itemId}</@cms.userVote>

          <@cms.userVote ids='1,2,3'><#list map as k,v>${k}:${v.itemId}<#sep>,</#list></@cms.userVote>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userVote?id=1', function(data){
            console.log(data.itemId);
          });
          </script>
           
          userVoteList User Vote List Query Directive

          Parameter List

          • userId: User ID
          • voteId: Vote ID
          • orderType: Sorting type, [asc: Ascending, desc: Descending], default is creation date descending
          • pageIndex: Page number
          • pageSize: Number of items per page

          Return Result

          • page:
            • DEFAULT_PAGE_SIZE: Default number of items per page
            • MAX_PAGE_SIZE: Maximum number of items per page
            • totalCount: Total count
            • pageSize: Number of items per page
            • firstResult: First result offset, current starting position
            • pageIndex: Current page index
            • totalPage: Total number of pages
            • list: Result list
          • page.list: List type, query result entity list
            • id: ID
            • anonymous: Anonymous user
            • itemId: Option ID
            • ip: IP
            • createDate: Creation Date

          Usage Example

          <@cms.userVoteList userId=1 pageSize=10><#list page.list as a>${a.ip}<#sep>,</#list></@cms.userVoteList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/userVoteList?userId=1&pageSize=10&appToken=Interface Access Authorization Token', function(data){
           console.log(data.page.totalCount);
          });
          </script>
           
          vote Vote Query Directive

          Parameter List

          • id: Vote ID, returns object
            • id: ID
            • startDate: Start Date
            • endDate: End Date
            • votes: Number of votes
            • title: Title
            • description: Description
            • allowAnonymous: Allow anonymous
            • createDate: Creation Date
          • ids: Multiple vote IDs, separated by commas or spaces, takes effect when id is empty, returns map(id, object)

          Usage Example

          <@cms.vote id=1>${object.title}</@cms.vote>

          <@cms.vote ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.vote>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/vote?id=1', function(data){
            console.log(data.title);
          });
          </script>
           
          voteItem Vote Option Query Directive

          Parameter List

          • id: Vote option ID, returns object
            • id: ID
            • voteId: Vote ID
            • title: Title
            • votes: Votes
            • sort: Sort
          • ids: Multiple vote option IDs, separated by commas or spaces, takes effect when id is empty, returns map(id, object)

          Usage Example

          <@cms.voteItem id=1>${object.title}</@cms.voteItem>

          <@cms.voteItem ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@cms.voteItem>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/voteItem?id=1', function(data){
            console.log(data.title);
          });
          </script>
           
          voteItemList Vote Option List Query Directive

          Parameter List

          • voteId: Vote ID
          • orderField: Sorting field, [votes: Number of voters, sort: Sort ascending], default is sort ascending
          • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
          • pageIndex: Page number
          • pageSize: Number of items per page

          Return Result

          • page:
            • DEFAULT_PAGE_SIZE: Default number of items per page
            • MAX_PAGE_SIZE: Maximum number of items per page
            • totalCount: Total count
            • pageSize: Number of items per page
            • firstResult: First result offset, current starting position
            • pageIndex: Current page index
            • totalPage: Total number of pages
            • list: Result list
          • page.list: List type, query result entity list
            • id: ID
            • voteId: Vote ID
            • title: Title
            • votes: Votes
            • sort: Sort

          Usage Example

          <@cms.voteItemList voteId=1 pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.voteItemList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/voteItemList?voteId=1&pageSize=10', function(data){
          console.log(data.page.totalCount);
          });
          </script>
           
          voteList Vote List Query Directive

          Parameter List

          • startStartDate: Start start date, [2020-01-01 23:59:59], [2020-01-01]
          • endStartDate: End start date, [2020-01-01 23:59:59], [2020-01-01]
          • startEndDate: Start end date, [2020-01-01 23:59:59], [2020-01-01]
          • endEndDate: End end date, [2020-01-01 23:59:59], [2020-01-01]
          • advanced: Enable advanced options, default is false
          • disabled: Advanced option: Disabled status, default is false
          • title: Advanced option: Title
          • orderField: Sorting field, [startDate: Start date, endDate: End date, votes: Number of voters, createDate: Creation date], default is id sorted by orderType
          • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
          • pageIndex: Page number
          • pageSize: Number of items per page

          Return Result

          • page:
            • DEFAULT_PAGE_SIZE: Default number of items per page
            • MAX_PAGE_SIZE: Maximum number of items per page
            • totalCount: Total count
            • pageSize: Number of items per page
            • firstResult: First result offset, current starting position
            • pageIndex: Current page index
            • totalPage: Total number of pages
            • list: Result list
          • page.list: List type, query result entity list
            • id: ID
            • startDate: Start date
            • endDate: End date
            • votes: Number of votes
            • title: Title
            • description: Description
            • allowAnonymous: Allow anonymous
            • createDate: Creation date

          Usage Example

          <@cms.voteList pageSize=10><#list page.list as a>${a.title}<#sep>,</#list></@cms.voteList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/voteList?pageSize=10', function(data){
          console.log(data.page.totalCount);
          });
          </script>
           
          word Search Term Query Directive

          Parameter List

          • id: Search term ID, returns object
            • id: ID
            • name: Name
            • searchCount: Search count
            • hidden: Hidden
            • ip: IP
            • createDate: Creation date
          • ids: Multiple search term IDs, separated by commas or spaces, takes effect when id is empty, returns map(id, object)

          Usage Example

          <@cms.word id=1>${object.name}</@cms.word>

          <@cms.word ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@cms.word>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/word?id=1&appToken=Interface Access Authorization Token', function(data){
            console.log(data.name);
          });
          </script>
           
          wordList User Vote List Query Directive

          Parameter List

          • startCreateDate: Start creation date, [2020-01-01 23:59:59], [2020-01-01]
          • endCreateDate: End creation date, [2020-01-01 23:59:59], [2020-01-01]
          • advanced: Enable advanced options, default is false
          • hidden: Advanced option: Disabled status, default is false
          • name: Advanced option: Name
          • orderField Advanced option: Sorting, [searchCount: Search count, createDate: Creation date, id: ID], default is searchCount sorted by orderType
          • orderType: Sorting type, [asc: Ascending, desc: Descending], default is creation date descending
          • pageIndex: Page number
          • pageSize: Number of items per page

          Return Result

          • page:
            • DEFAULT_PAGE_SIZE: Default number of items per page
            • MAX_PAGE_SIZE: Maximum number of items per page
            • totalCount: Total count
            • pageSize: Number of items per page
            • firstResult: First result offset, current starting position
            • pageIndex: Current page index
            • totalPage: Total number of pages
            • list: Result list
          • page.list: List type, query result entity list
            • id: ID
            • name: Name
            • searchCount: Search count
            • hidden: Hidden
            • ip: IP
            • createDate: Creation date

          Usage Example

          <@cms.wordList userId=1 pageSize=10><#list page.list as a>${a.ip}<#sep>,</#list></@cms.wordList>

          <script>
          $.getJSON('${site.dynamicPath}api/directive/cms/wordList?userId=1&pageSize=10', function(data){
          console.log(data.page.totalCount);
          });
          </script>
           
          wordload Workload Query Directive

          Parameter List

          • status: Multiple content statuses, [0: Draft, 1: Published, 2: Pending review, 3: Rejected]
          • startCreateDate: Start creation date, [2020-01-01 23:59:59], [2020-01-01]
          • endCreateDate: End creation date, [2020-01-01 23:59:59], [2020-01-01]
          • workloadType: Workload type [dept: Department, user: User], default is department
          • dateField: Date field [createDate: Creation date, publishDate: Publish date], default is creation date

          Return Result

          • list: List type, query result entity list

            Usage Example

            <@cms.wordload pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@cms.wordload>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/cms/wordload?pageSize=10&appToken=Interface Access Authorization Token', function(data){
                console.log(data.page.totalCount);
              });
              </script>
             
            logLoginList Login Log List Query Directive

            Parameter List

            • userId: User ID
            • startCreateDate: Start creation date, [2020-01-01 23:59:59], [2020-01-01]
            • endCreateDate: End creation date, [2020-01-01 23:59:59], [2020-01-01]
            • channel: Login channel
            • loginMethod: Login method
            • result: Login result, [true, false]
            • name: Username
            • ip: IP
            • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset, current starting position
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type, query result entity list
              • id: ID
              • name: Name
              • userId: User ID
              • ip: IP
              • channel: Login channel
              • loginMethod: Login method
              • result: Login result
              • createDate: Login date
              • errorPassword: Error password

            Usage Example

            <@log.loginList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.loginList>

              <script>
               $.getJSON('${site.dynamicPath}api/directive/log/loginList?pageSize=10&appToken=Interface Access Authorization Token', function(data){
                 console.log(data.page.totalCount);
               });
               </script>
             
            logOperate Operation Log Query Directive

            Parameter List

            • id: Log ID, returns object
              • id: ID
              • userId: User ID
              • deptId: Department ID
              • channel: Channel
              • operate: Operation channel
              • ip: IP
              • createDate: Operation date
              • content: Content
            • ids: Multiple log IDs, separated by commas or spaces, takes effect when id is empty, returns map(id, object)
            Usage Example

            <@log.operate id=1>${object.content}</@log.operate>

            <@log.operate ids='1,2,3'><#list map as k,v>${k}:${v.content}<#sep>,</#list></@log.operate>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/log/operate?id=1&appToken=Interface Access Authorization Token', function(data){
              console.log(data.content);
            });
            </script>
             
            logOperateList Operation Log List Query Directive

            Parameter List

            • channel: Channel
            • operate: Operation code
            • userId: User ID
            • startCreateDate: Start creation date, [2020-01-01 23:59:59], [2020-01-01]
            • endCreateDate: End creation date, [2020-01-01 23:59:59], [2020-01-01]
            • content: Operation content
            • name: Username
            • ip: IP
            • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset, current starting position
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type, query result entity list
              • id: ID
              • userId: User ID
              • deptId: Department ID
              • channel: Channel
              • operate: Operation channel
              • ip: IP
              • createDate: Operation date
              • content: Content

            Usage Example

            <@log.operateList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.operateList>

              <script>
               $.getJSON('${site.dynamicPath}api/directive/log/OperateList?pageSize=10&appToken=Interface Access Authorization Token', function(data){
                 console.log(data.page.totalCount);
               });
               </script>
             
            logTask Task Plan Log Query Directive

            Parameter List

            • id: Log ID, returns object
              • id: ID
              • taskId: Task ID
              • begintime: Begin time
              • endtime: End time
              • success: Success
              • result: Result
            • ids: Multiple log IDs, separated by commas or spaces, takes effect when id is empty, returns map(id, object)
            Usage Example

            <@log.task id=1>${object.result}</@log.task>

            <@log.task ids='1,2,3'><#list map as k,v>${k}:${v.result}<#sep>,</#list></@log.task>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/log/task?id=1&appToken=Interface Access Authorization Token', function(data){
              console.log(data.result);
            });
            </script>
             
            logTaskList Task Plan Log List Query Directive

            Parameter List

            • taskId: Task plan ID
            • startCreateDate: Start creation date, [2020-01-01 23:59:59], [2020-01-01]
            • endCreateDate: End creation date, [2020-01-01 23:59:59], [2020-01-01]
            • success: Execution result, [true, false]
            • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset, current starting position
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type, query result entity list
              • id: ID
              • taskId: Task ID
              • begintime: Begin time
              • endtime: End time
              • success: Success
              • result: Result

            Usage Example

            <@log.taskList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.taskList>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/log/TaskList?pageSize=10&appToken=Interface Access Authorization Token', function(data){
                console.log(data.page.totalCount);
              });
              </script>
             
            logUploadList File Upload Log List Query Directive

            Parameter List

            • fileTypes: File types, [image, video, audio, document, other]
            • image: Whether image, [true, false]
            • userId: User ID
            • channel: Channel
            • privatefile: Private file, [true, false], default false
            • originalName: Original filename
            • filePath: File path
            • orderField: Sorting field, [createDate: Creation date, fileSize: File size], default ID descending
            • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset, current starting position
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type, query result entity list
              • id: ID
              • userId: User ID
              • channel: Operation channel
              • originalName: Original filename
              • privatefile: Private file
              • fileType: File type
              • fileSize: File size
              • width: Image width
              • height: Image height
              • ip: IP
              • createDate: Upload date
              • filePath: File path

            Usage Example

            <@log.uploadList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@log.uploadList>

              <script>
               $.getJSON('${site.dynamicPath}api/directive/log/UploadList?pageSize=10&appToken=Interface Access Authorization Token', function(data){
                 console.log(data.page.totalCount);
               });
               </script>
             
            sysApp Application Query Directive

            Parameter List

            • id: Application ID, returns object
              • id: ID
              • channel: Channel
              • appKey: App key
              • appSecret: App secret
              • authorizedApis: Authorized APIs
              • expiryMinutes: Expiry minutes
            • ids: Multiple application IDs, separated by commas or spaces, takes effect when id is empty, returns map(id, object)
            Usage Example

            <@sys.app id=1>${object.channel}</@sys.app>

            <@sys.app ids='1,2,3'><#list map as k,v>${k}:${v.channel}<#sep>,</#list></@sys.app>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/app?id=1&appToken=Interface Access Authorization Token', function(data){
              console.log(data.channel);
            });
            </script>
             
            sysAppClient Application Client Query Directive

            Parameter List

            • id: Client ID, returns object
              • id: ID
              • channel: Channel
              • uuid: UUID
              • userId: User ID
              • clientVersion: Client version
              • lastLoginDate: Last login date
              • lastLoginIp: Last login IP
              • createDate: Creation date
            • ids: Multiple client IDs, separated by commas or spaces, takes effect when id is empty, returns map(id, object)

            Usage Example

            <@sys.appClient id=1>${object.clientVersion}</@sys.appClient>

            <@sys.appClient ids='1,2,3'><#list map as k,v>${k}:${v.clientVersion}<#sep>,</#list></@sys.appClient>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/appClient?id=1&appToken=Interface Access Authorization Token', function(data){
              console.log(data.clientVersion);
            });
            </script>
             
            sysAppClientList Application Client List Query Directive

            Parameter List

            • advanced: Enable advanced options, default is false
            • disabled: Advanced option: Disabled status, [true, false], default false
            • channel: Channel
            • userId: User ID
            • startLastLoginDate: Start last login date, [2020-01-01 23:59:59], [2020-01-01]
            • endLastLoginDate: End last login date, [2020-01-01 23:59:59], [2020-01-01]
            • startCreateDate: Start creation date, [2020-01-01 23:59:59], [2020-01-01]
            • endCreateDate: End creation date, [2020-01-01 23:59:59], [2020-01-01]
            • orderField: Sorting field, [lastLoginDate: Last login date, createDate: Creation date], default creation date descending
            • orderType: Sorting type, [asc: Ascending, desc: Descending], default is descending
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset, current starting position
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type, query result entity list
              • id: ID
              • channel: Channel
              • uuid: UUID
              • userId: User ID
              • clientVersion: Client version
              • lastLoginDate: Last login date
              • lastLoginIp: Last login IP
              • createDate: Creation date

            Usage Example

            <@sys.appClientList pageSize=10><#list page.list as a>${a.uuid}<#sep>,</#list></@sys.appClientList>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/sys/appClientList?pageSize=10&appToken=Interface Access Authorization Token', function(data){
                console.log(data.page.totalCount);
              });
              </script>
             
            sysAppList Application List Query Directive

            Parameter List

            • channel: Channel
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset, current starting position
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type, query result entity list
              • id: ID
              • channel: Channel
              • appKey: App key
              • appSecret: App secret
              • authorizedApis: Authorized APIs
              • expiryMinutes: Expiry minutes

            Usage Example

            <@sys.appList pageSize=10><#list page.list as a>${a.channel}<#sep>,</#list></@sys.appList>

            sysAppTokenList Application Authorization List Query Directive

            Parameter List

            • appId: Application ID
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset (current starting position)
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type query result entity list
              • authToken: Authorization verification code
              • appId: Application ID
              • createDate: Creation date
              • expiryDate: Expiration date

            Usage Example

            <@sys.appTokenList pageSize=10><#list page.list as a>${a.authToken}<#sep>,</#list></@sys.appTokenList>

            sysAuthorized Role URL Authorization Query Directive

            Parameter List

            • roleIds: Multiple role IDs
            • url: URL. When both roleIds and url are provided, returns true or false, indicating whether these roles have permission for the URL.
            • urls: Multiple URLs. Effective when roleIds is provided and url is empty. Returns map(url, true or false).

            Usage Example

            <@sys.authorized roleIds='1,2,3' url='cmsContent/list'>${object}</@sys.authorized>

            <@sys.authorized roleIds='1,2,3' urls='cmsContent/list,cmsCategory/list'><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.authorized>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/authorized?roleIds=1,2,3&url=cmsContent/list&appToken=Interface Access Authorization Token', function(data){
               console.log(data);
             });
             </script>
            
            sysClusterList System Node List Query Directive

            Parameter List

            • startHeartbeatDate: Start heartbeat date, e.g., ["2020-01-01 23:59:59", "2020-01-01"]
            • endHeartbeatDate: End heartbeat date, e.g., ["2020-01-01 23:59:59", "2020-01-01"]
            • master: Whether it is the master node, ["true", "false"], default is false.
            • orderField: Sorting field, ["createDate": Last login date, "heartbeatDate": Creation date, "id"], default is ID in descending order.
            • orderType: Sorting type, ["asc": Ascending, "desc": Descending], default is descending.
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset (current starting position)
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type query result entity list
              • uuid: UUID
              • createDate: Startup date
              • heartbeatDate: Last heartbeat date
              • master: Management node
              • cmsVersion: CMS version
              • revision: Revision version

            Usage Example

            <@sys.clusterList pageSize=10><#list page.list as a>${a.uuid}<#sep>,</#list></@sys.clusterList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/clusterList?pageSize=10', function(data){
               console.log(data.page.totalCount);
             });
             </script>
            
            sysConfig Configuration Query Directive

            Parameter List

            • code: Configuration code. Returns object:
              • code: Code
              • description: Description
              • customed: Customized

            Usage Example

            <@sys.config code='site'>${object.description}</@sys.config>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/config?code=site&appToken=Interface Access Authorization Token', function(data){
              console.log(data.description);
            });
            </script>
            
            sysConfigData Configuration Data Query Directive

            Parameter List

            • code: Configuration code. Returns object:
              • id: ID
              • data: Configuration data
              • createDate: Creation date
              • updateDate: Update date
            • codes: Multiple configuration codes. Returns map(code, object).

            Usage Example

            <@sys.configData code='site'>${object.register_url}</@sys.configData>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/configData?code=site&appToken=Interface Access Authorization Token', function(data){
             console.log(data.register_url);
            });
            </script>
            
            sysConfigFieldList Configuration Data Field List Query Directive

            Parameter List

            • code: Configuration code

            Return Result

            • list: List type query result entity list
              • id: ID
              • required: Required field
              • searchable: Searchable
              • sortable: Sortable field
              • maxlength: Maximum length
              • width: Image width
              • height: Image height
              • name: Name
              • description: Description
              • inputType: Form type
              • defaultValue: Default value
              • dictionaryId: Data dictionary
              • multiple: Multiple selection
              • sort: Sorting

            Usage Example

            <@sys.configFieldList pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.configFieldList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/configFieldList?appToken=Interface Access Authorization Token', function(data){
               console.log(data);
             });
             </script>
            
            sysConfigList Configuration List Query Directive

            Return Result

            • list: List type query result entity list
              • code: Code
              • description: Description
              • customed: Customized

            Usage Example

            <@sys.configList><#list list as a>${a.code}<#sep>,</#list></@sys.configList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/configList?appToken=Interface Access Authorization Token', function(data){
               console.log(data);
             });
             </script>
            
            sysDept Department Query Directive

            Parameter List

            • id: Department ID. Returns object:
              • id: ID
              • name: Name
              • code: Code
              • parentId: Parent department ID
              • description: Description
              • userId: Responsible user ID
              • hasChild: Has child departments
              • maxSort: Maximum content pinning level
              • ownsAllCategory: Owns all categories
              • ownsAllPage: Owns all pages
              • ownsAllConfig: Owns all configurations
            • ids: Multiple department IDs, comma or space separated. Effective when id is empty. Returns map(id, object).

            Usage Example

            <@sys.dept id=1>${object.name}</@sys.dept>

            <@sys.dept ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.dept>

            <script>
            $.getJSON('//sys.publicsys.com/api/directive/sys/dept?id=1&appToken=Interface Access Authorization Token', function(data){
              console.log(data.name);
            });
            </script>
            
            sysDeptItem Data Authorization Query Directive

            Parameter List

            • deptId: Department ID
            • ItemId: Category ID. When both deptId and ItemId are provided, returns true or false, indicating whether the department has data permissions for the category.
            • ItemIds: Multiple category IDs. Effective when deptId is provided and ItemId is empty. Returns map(category ID, true or false).

            Usage Example

            <@sys.deptItem deptId=1 ItemId=1>${object}</@sys.deptItem>

            <@sys.deptItem deptId=1 ItemIds=1,2,3><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.deptItem>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/deptItem?deptId=1&ItemId=1&appToken=Interface Access Authorization Token', function(data){
               console.log(data);
             });
             </script>
            
            sysDeptItemList Department Data Authorization List Query Directive

            Parameter List

            • deptId: Department ID
            • itemType: Item type
            • itemId: Item ID
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset (current starting position)
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type query result entity list
              • id: ID

            Usage Example

            <@sys.deptCategoryList deptId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.deptCategoryList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/deptCategoryList?deptId=1&pageSize=10&appToken=Interface Access Authorization Token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
            
            sysDeptList Department List Query Directive

            Parameter List

            • parentId: Parent department ID
            • userId: Responsible user ID
            • name: Name
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset (current starting position)
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type query result entity list
              • id: ID
              • name: Name
              • code: Code
              • parentId: Parent department ID
              • description: Description
              • userId: Responsible user ID
              • hasChild: Has child departments
              • maxSort: Maximum content pinning level
              • ownsAllCategory: Owns all categories
              • ownsAllPage: Owns all pages
              • ownsAllConfig: Owns all configurations

            Usage Example

            <@sys.deptList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.deptList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/deptList?pageSize=10&appToken=Interface Access Authorization Token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
            
            sysDomain Domain Query Directive

            Parameter List

            • id: Domain. Returns object:
              • name: Domain name
              • siteId: Site ID
              • wild: Wildcard domain
              • path: Root template path
            • ids: Multiple domains, comma or space separated. Effective when id is empty. Returns map(id, object).

            Usage Example

            <@sys.domain id='www.publiccms.com'>${object.name}</@sys.domain>

            <@sys.domain ids='www.publiccms.com,www.sanluan.com'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.domain>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/domain?id=1&appToken=Interface Access Authorization Token', function(data){
              console.log(data.name);
            });
            </script>
            
            sysDomainList Domain List Query Directive

            Parameter List

            • advanced: Enable advanced options, default is false.
            • siteId: Advanced option: Site ID
            • wild: Advanced option: Wildcard domain, ["true", "false"]
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset (current starting position)
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type query result entity list
              • name: Domain name
              • siteId: Site ID
              • wild: Wildcard domain
              • path: Root template path

            Usage Example

            <@sys.domainList deptId=1 pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.domainList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/domainList?pageSize=10&appToken=Interface Access Authorization Token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
            
            sysExtendFieldList Extended Field List Query Directive

            Parameter List

            • extendId: Extended ID
            • inputType: Multiple input types ["text: input box, number: number, textarea: multi-line text, file: file, image: image, video: video, password: password, editor: Baidu editor, ckeditor: CKEditor, tinymce: TinyMCE, date: date, datetime: time, color: color, alphaColor: color with transparency, template: template path, boolean: yes/no, user: user, dept: department, content: content, category: category, dictionary: data dictionary, categoryType: category type, tagType: tag type, vote: vote, survey: survey, tag: tag"]
            • searchable: Searchable, ["true", "false"]

            Return Result

            • list: List type query result entity list
              • id: ID
              • required: Required field
              • searchable: Searchable
              • sortable: Sortable field
              • maxlength: Maximum length
              • width: Image width
              • height: Image height
              • name: Name
              • description: Description
              • inputType: Form type
              • defaultValue: Default value
              • dictionaryId: Data dictionary
              • multiple: Multiple selection
              • sort: Sorting

            Usage Example

            <@sys.extendFieldList deptId=1 pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.extendFieldList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/extendFieldList?extendId=1&appToken=Interface Access Authorization Token', function(data){
               console.log(data);
             });
             </script>
            
            lock Lock Query Directive

            Parameter List

            • itemType: Item type
            • itemId: Item ID. Returns object:
              • id: ID
              • userId: User ID
              • count: Lock count
              • createDate: Creation date
              • updateDate: Update date
            • itemIds: Multiple item IDs, comma or space separated. Effective when id is empty. Returns map(id, object).

            Usage Example

            <@sys.lock id=1>${object.count}</@sys.lock>

            <@sys.lock ids='1,2,3'><#list map as k,v>${k}:${v.count}<#sep>,</#list></@sys.lock>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/lock?id=1', function(data){
              console.log(data.count);
            });
            </script>
            
            sysModule Module Query Directive

            Parameter List

            • id: Module ID. Returns object:
              • id: ID
              • url: URL
              • authorizedUrl: Authorized access URL
              • attached: Attached information
              • parentId: Parent module ID
              • menu: Is menu
              • hasChild: Has child modules
              • sort: Sorting
            • ids: Multiple module IDs, comma or space separated. Effective when id is empty. Returns map(id, object).

            Usage Example

            <@sys.module id='page'>${object.url}</@sys.module>

            <@sys.module ids='page,develop'><#list map as k,v>${k}:${v.url}<#sep>,</#list></@sys.module>

            <script>
            $.getJSON('//sys.publicsys.com/api/directive/sys/module?id=page&appToken=Interface Access Authorization Token', function(data){
              console.log(data.url);
            });
            </script>
            
            sysModuleLang Module Language Query Directive

            Parameter List

            • moduleId: Module ID. Returns object:
              • id: ID
              • url: URL
              • authorizedUrl: Authorized access URL
              • attached: Attached information
              • parentId: Parent module ID
              • menu: Is menu
              • hasChild: Has child modules
              • sort: Sorting
            • lang: Language ["zh: Chinese, en: English, ja: Japanese"]

            Usage Example

            <@sys.moduleLang moduleId='page' lang='zh'>${object}</@sys.moduleLang>

            <script>
            $.getJSON('//sys.publicsys.com/api/directive/sys/moduleLang?moduleId=page&lang=zh', function(data){
             console.log(data);
            });
            </script>
            
            sysModuleList Module List Query Directive

            Parameter List

            • advanced: Enable advanced options, default is false.
            • menu: Advanced option: Is menu, ["true", "false"]
            • parentId: Parent module ID
            • pageIndex: Page number
            • pageSize: Number of items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE: Default number of items per page
              • MAX_PAGE_SIZE: Maximum number of items per page
              • totalCount: Total count
              • pageSize: Number of items per page
              • firstResult: First result offset (current starting position)
              • pageIndex: Current page index
              • totalPage: Total number of pages
              • list: Result list
            • page.list: List type query result entity list
              • id: ID
              • url: URL
              • authorizedUrl: Authorized access URL
              • attached: Attached information
              • parentId: Parent module ID
              • menu: Is menu
              • hasChild: Has child modules
              • sort: Sorting

            Usage Example

            <@sys.moduleList parentId='page' pageSize=10><#list page.list as a>${springMacroRequestContext.getMessage('menu.'+a.id)}<#sep>,</#list></@sys.moduleList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/moduleList?parentId=page&pageSize=10&appToken=Interface Access Authorization Token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
            
            sysRecord Custom Record Query/Write Directive

            Parameter List

            • code: Record code. Returns object.
            • data: Record data. If not empty, records the data:
              • id: ID
              • data: Record data
              • createDate: Creation date
              • updateDate: Update date
            • codes: Multiple record codes. Returns map(id, object).

            Usage Example

            <@sys.record code='site' data='data'>${object.data}</@sys.record>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/record?code=site&data=data&appToken=Interface Access Authorization Token', function(data){
             console.log(data.data);
            });
            </script>
            
            sysRecordList Custom Record List Query Directive

            Parameter List

            • code: Code
            • startCreateDate: Start creation date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】
            • endCreateDate: End creation date (cannot exceed current time when advanced options are disabled), format: 【2020-01-01 23:59:59】 or 【2020-01-01】
            • orderField: Sorting field, 【updateDate: update date】 Default: creation date in descending order
            • orderType: Sorting type, 【asc: ascending, desc: descending】, Default: descending
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • list: List type query result entity list
              • id : id
              • data : record data
              • createDate : creation date
              • updateDate : update date

            Usage Example

            <@sys.recordList><#list list as a>${a.data}<#sep>,</#list></@sys.recordList>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/sys/recordList?appToken=API access token', function(data){
                console.log(data);
              });
              </script>
             
            sysRole Role Query Directive

            Parameter List

            • id: Role id, returns object
              • id : id
              • name : name
              • ownsAllRight : owns all right
              • showAllModule : show all modules
            • ids: Multiple role ids, comma or space separated, takes effect when id is empty, returns map(id,object)

            Usage Example

            <@sys.role id=1>${object.name}</@sys.role>

            <@sys.role ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.role>

            <script>
            $.getJSON('//sys.publicsys.com/api/directive/sys/role?id=1&appToken=API access token', function(data){
              console.log(data.name);
            });
            </script>
             
            sysRoleList Role List Query Directive

            Parameter List

            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : id
              • name : name
              • ownsAllRight : owns all right
              • showAllModule : show all modules

            Usage Example

            <@sys.roleList deptId=1 pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.roleList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/roleList?deptId=1&pageSize=10&appToken=API access token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            sysRoleModule Role Module Authorization Query Directive

            Parameter List

            • roleIds: Multiple role ids
            • moduleId Module id, when both roleIds and moduleId exist, returns true or false indicating whether these roles have data permissions for this module
            • moduleIds Multiple module ids, takes effect when roleIds exist and moduleId is empty, returns map(module id, true or false)

            Usage Example

            <@sys.roleModule roleIds='1,2,3' modelId='page'>${object}</@sys.roleModule>

            <@sys.roleModule roleIds='1,2,3' modelIds='page,content'><#list map as k,v>${k}:${v}<#sep>,</#list></@sys.roleModule>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/roleModule?roleIds=1,2,3&modelId=page&appToken=API access token', function(data){
              console.log(data);
            });
            </script>
             
            sysRoleModuleList Role Module Mapping List Query Directive

            Parameter List

            • roleId: Role id
            • moduleId: Module id
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : id

            Usage Example

            <@sys.roleModuleList roleId=1 pageSize=10><#list page.list as a>${a.id.roleId}<#sep>,</#list></@sys.roleModuleList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/sysDeptCategoryList?roleId=1&pageSize=10&appToken=API access token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            sysRoleUserList Role User List Query Directive

            Parameter List

            • roleId: Role id
            • userId: User id
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : id

            Usage Example

            <@sys.roleUserList roleId=1 pageSize=10><#list page.list as a>${a.id.roleId}<#sep>,</#list></@sys.roleUserList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/roleUserList?roleId=1&pageSize=10&appToken=API access token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            sysSite Site Query Directive

            Parameter List

            • id: Site id, returns object
              • id : id
              • parentId : parent site id
              • directory : directory
              • name : name
              • useStatic : use static
              • sitePath : site url
              • useSsi : use SSI
              • dynamicPath : dynamic site url
              • hasChild : has child site
              • multiple : multiple site
            • ids: Multiple site ids, comma or space separated, takes effect when id is empty, returns map(id,object)

            Usage Example

            <@sys.site id=1>${object.name}</@sys.site>

            <@sys.site ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.site>

            <script>
            $.getJSON('//sys.publicsys.com/api/directive/sys/site?id=1&appToken=API access token', function(data){
              console.log(data.name);
            });
            </script>
             
            sysSiteList Site List Query Directive

            Parameter List

            • advanced: Enable advanced options, default false
            • disabled: Advanced option: disabled, 【true,false】
            • parentId: Parent site id
            • name: Name
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : id
              • parentId : parent site id
              • directory : directory
              • name : name
              • useStatic : use static
              • sitePath : site url
              • useSsi : use SSI
              • dynamicPath : dynamic site url
              • hasChild : has child site
              • multiple : multiple site

            Usage Example

            <@sys.siteList pageSize=10><#list page.list as a>${a.name}<#sep>,</#list></@sys.siteList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/siteList?pageSize=10&appToken=API access token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            sysTask Task Plan Query Directive

            Parameter List

            • id: Task plan id, returns object
              • id : id
              • name : name
              • status : status(0:ready,1:running,2:paused,3:error)
              • multiNode : multi-node execution
              • cronExpression : cron expression
              • description : description
              • filepath : file path
              • updateDate : update date
            • ids: Multiple task plan ids, comma or space separated, takes effect when id is empty, returns map(id,object)

            Usage Example

            <@sys.task id=1>${object.name}</@sys.task>

            <@sys.task ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.task>

            <script>
            $.getJSON('//sys.publicsys.com/api/directive/sys/task?id=1&appToken=API access token', function(data){
              console.log(data.name);
            });
            </script>
             
            sysTaskList Task Plan List Query Directive

            Parameter List

            • status: Status 【0:ready,1:running,2:paused,3:error】
            • startUpdateDate: Start update date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : id
              • name : name
              • status : status(0:ready,1:running,2:paused,3:error)
              • multiNode : multi-node execution
              • cronExpression : cron expression
              • description : description
              • filepath : file path
              • updateDate : update date

            Usage Example

            <@sys.taskList deptId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.taskList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/taskList?deptId=1&pageSize=10&appToken=API access token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            sysUser User Query Directive

            Parameter List

            • replaceSensitive: Replace sensitive words, default true
            • id: User id, returns object
              • id : id
              • name : name
              • weakPassword : weak password
              • nickname : nickname
              • cover : cover image
              • deptId : department id
              • contentPermissions : content permissions(0:self,1:all,2:dept)
              • roles : role ids
              • email : email address
              • emailChecked : email verified
              • superuser : super user (admin)
              • disabled : disabled
              • lastLoginDate : last login date
              • lastLoginIp : last login ip
              • loginCount : login count
              • registeredDate : register date
              • updateDate : update date
            • ids: Multiple user ids, comma or space separated, takes effect when id is empty, returns map(id,object)
            • absoluteURL: Process cover as absolute path, default true

            Usage Example

            <@sys.user id=1>${object.name}</@sys.user>

            <@sys.user ids='1,2,3'><#list map as k,v>${k}:${v.name}<#sep>,</#list></@sys.user>

            <script>
            $.getJSON('//sys.publicsys.com/api/directive/sys/user?id=1&appToken=API access token', function(data){
              console.log(data.name);
            });
            </script>
             
            sysUserList User List Query Directive

            Parameter List

            • advanced: Enable advanced options, default false
            • replaceSensitive: Replace sensitive words, default true
            • disabled: Advanced option: disabled, 【true,false】, default false
            • deptId: Department id
            • startRegisteredDate: Start registration date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】
            • endRegisteredDate: End registration date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】
            • startLastLoginDate: Start last login date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】
            • endLastLoginDate: End last login date, format: 【2020-01-01 23:59:59】 or 【2020-01-01】
            • superuser: Admin, 【true,false】
            • emailChecked: Email verified, 【true,false】
            • name: Nickname, username, or email
            • orderField: Sorting field, 【lastLoginDate:last login date,loginCount:login count,registeredDate:registration date,followers:followers count】, default creation date sorted by orderType
            • orderType: Sorting type, 【asc:ascending,desc:descending】, default descending
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : id
              • name : name
              • weakPassword : weak password
              • nickname : nickname
              • cover : cover image
              • deptId : department id
              • contentPermissions : content permissions(0:self,1:all,2:dept)
              • roles : role ids
              • email : email address
              • emailChecked : email verified
              • superuser : super user (admin)
              • disabled : disabled
              • lastLoginDate : last login date
              • lastLoginIp : last login ip
              • loginCount : login count
              • registeredDate : registration date
              • updateDate : update date

            Usage Example

            <@sys.userList deptId=1 pageSize=10><#list page.list as a>${a.nickname}<#sep>,</#list></@sys.userList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/userList?deptId=1&pageSize=10&appToken=API access token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            sysUserSetting Configuration Data Query Directive

            Parameter List

            • userId: User ID
            • code: Configuration code, returns string when userId is not empty
            • data: Configuration data, returns string when both configuration code and userId are not empty
            • codes: Multiple configuration codes, returns map(code,string) when userId is not empty
            • userIds: Multiple user IDs, returns map(userId,string) when code is not empty

            Usage Example

            <@sys.UserSetting userId=1 code='home_title'>${object}</@sys.UserSetting>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/sys/UserSetting?uscode=site&appToken=API access token', function(data){
             console.log(data.register_url);
            });
            </script>
             
            sysUserTokenList User Login Authorization List Query Directive

            Parameter List

            • userId: User id
            • channel: Channel
            • orderField: Sorting field, 【expiryDate:expiration date,createDate:creation date】, default creation date sorted by orderType
            • orderType: Sorting type, 【asc:ascending,desc:descending】, default descending
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • authToken : auth token
              • userId : user id
              • channel : channel
              • createDate : creation date
              • expiryDate : expiration date
              • loginIp : login ip

            Usage Example

            <@sys.userTokenList userId=1 pageSize=10><#list page.list as a>${a.id.deptId}<#sep>,</#list></@sys.userTokenList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/sys/userTokenList?pageSize=10&authToken=User login token&authUserId=User id', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            SysWorkflowDirective
            SysWorkflowListDirective
            SysWorkflowProcessDirective
            SysWorkflowProcessHistoryListDirective
            SysWorkflowProcessDirective
            SysWorkflowProcessListDirective
            SysWorkflowStepDirective
            sysWorkflowStepListDirective

            Workflow Step List Query Directive

            Parameter List

            • workflowId: Workflow id

            Return Result

            • list: List type query result entity list
              • id : id
              • required : required
              • searchable : searchable
              • sortable : sortable field
              • maxlength : max length
              • width : image width
              • height : image height
              • name : name
              • description : description
              • inputType : input type
              • defaultValue : default value
              • dictionaryId : dictionary id
              • multiple : multiple selection
              • sort : sort order

            Usage Example

            <@sys.extendFieldList deptId=1 pageSize=10><#list list as a>${a.name}<#sep>,</#list></@sys.extendFieldList>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/sys/workflowStepList?workflowId=1', function(data){
                console.log(data);
              });
              </script>
             
            clearLog Log Cleanup Directive

            Parameter List

            • clearDate: Start publication date, formats: 【2020-01-01 23:59:59】, 【2020-01-01】, default is 3 months ago

            Return Result

            • result: Map type
            • result.loginLog: Login log deletion count
            • result.operateLog: Operation log deletion count
            • result.taskLog: Task schedule log deletion count

            Usage Example

            <@task.clearLog><#list result as k,v>${k}:${v}<#sep>,</#list></@task.clearLog>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/task/clearLog?appToken=API access authorization Token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            indexContent Rebuild Content Index Directive

            Parameter List

            • id: Content ID, effective when ids is empty
            • ids: Multiple content IDs

            Usage Example

            <@task.indexContent id=1><</@task.indexContent>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/task/indexContent?id=1&appToken=API access authorization Token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            publishCategory Publish Category Static Page Directive

            Parameter List

            • id: Category ID
            • ids: Multiple category IDs
            • pageIndex: Current page number, default is 1
            • totalPage: Maximum page number, if empty only generates current page

            Return Result

            • map: Map type, key is content ID, value is generation result

            Usage Example

            <@task.publishCategory id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishCategory>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/task/publishCategory?id=1&appToken=API access authorization Token', function(data){
               console.log(data);
             });
             </script>
             
            publishContent Publish Content Static Page Directive

            Parameter List

            • id: Content ID
            • ids: Multiple content IDs, effective when id is empty

            Return Result

            • map: Map type, key is content ID, value is generation result

            Usage Example

            <@task.publishContent id=1><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishContent>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/task/publishContent?id=1&appToken=API access authorization Token', function(data){
               console.log(data);
             });
             </script>
             
            publishPage Page Staticization Directive

            Parameter List

            • path: Page path, default is "/"

            Return Result

            • map: Map type, key is page path, value is generation result

            Usage Example

            <@task.publishPage><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishPage>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/task/publishPage?path=&appToken=API access authorization Token', function(data){
               console.log(data);
             });
             </script>
             
            publishPlace Page Fragment Staticization Directive

            Parameter List

            • path: Page path, default is "/"

            Return Result

            • map: Map type, key is page path, value is generation result

            Usage Example

            <@task.publishPlace><#list map as k,v>${k}:${v}<#sep>,</#list></@task.publishPlace>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/task/publishPlace?path=&appToken=API access authorization Token', function(data){
               console.log(data);
             });
             </script>
             
            createCategoryFile Create Category Static File Directive

            Parameter List

            • id: Category ID
            • templatePath: Template path
            • filePath: Static file path
            • pageIndex: Current page number, default is 1
            • totalPage: Maximum page number, if empty only generates current page

            Return Result

            • url: Static file path

            Usage Example

            <@tools.createCategoryFile id=1 templatePath='category.html' filePath='category/'+1+'.html'>${url}</@tools.createCategoryFile>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/createCategoryFile?id=1&templatePath=category.html&filePath=category/1.html&appToken=API access authorization Token', function(data){
               console.log(data);
             });
             </script>
             
            createContentFile Create Content Static File Directive

            Parameter List

            • id: Content ID
            • templatePath: Template path
            • filePath: Static file path
            • pageIndex: Current page number, default is 1

            Return Result

            • url: Static file path

            Usage Example

            <@tools.createContentFile id=1 templatePath='content.html' filePath='content/'+1+'.html'>${url}</@tools.createContentFile>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/tools/createContentFile?id=1&templatePath=content.html&filePath=content/1.html&appToken=API access authorization Token', function(data){
              console.log(data);
            });
            </script>
             
            createLock Create Lock Directive

            Parameter List

            • itemType: Locked item type
            • itemId: Locked item ID
            • userId: Locking user ID
            • counter: Count, default is 0:

            Return Result

            • object:
              • id : ID
              • userId : User ID
              • count : Locked count
              • createDate : Create date
              • updateDate : Update date

            Usage Example

            <@tools.createLock itemType='content' itemId='1' userId='1'>${url}</@tools.createLock>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/tools/createLock?itemType=content&itemId=1&userId=1&appToken=API access authorization Token', function(data){
              console.log(data);
            });
            </script>
             
            createTemplateFile Create Static File Directive

            Parameter List

            • templatePath: Template path
            • filePath: Static file path
            • pageIndex: Current page number, default is 1
            • parameters: Parameter map

            Return Result

            • url: Static file path

            Usage Example

            <@tools.createTemplateFile templatePath='template.html' filePath='page/'+1+'.html' parameters={"parameter1","value1"}>${url}</@tools.createTemplateFile>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/tools/createTemplateFile?id=1&templatePath=template.html&filePath=page/1.html&parameters.parameter1=value1&appToken=API access authorization Token', function(data){
              console.log(data);
            });
            </script>
             
            csrfToken Anti-Cross-Site Request Forgery Token Directive

            Parameter List

            • admin: Whether for admin, default is false:

            Return Result

            • Prints token value

            Usage Example

            <input type="hidden" name="_csrf" value="<@tools.csrfToken/>"/>

            disk Disk Space and Path Directive

            Return Result

            • freeSpace: Free space
            • totalSpace: Total space
            • usableSpace: Usable space
            • rootPath: Absolute path

            Usage Example

            <@tools.disk>${freeSpace}</@tools.disk>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/tools/disk?appToken=API access authorization Token', function(data){
             console.log(data);
            });
            </script>
             
            diyMetadata DIY Metadata Retrieval Directive

            Parameter List

            • itemType: Metadata type, 【region, layout, module】
            • itemId: Metadata ID

            Return Result

            • object: DIY Metadata region:
              • id : ID
              • categoryType : Category type
              • name : Name
              ,layout:
              • id : ID
              • region : Region
              • name : Name
              • template : Template
              • style : Style
              ,module:
              • id : ID
              • region : Region
              • name : Name
              • clone : Clone
              • cover : Cover
              • place : Place path
              • fragment : Fragment path
              • filePath : File path

            Usage Example

            <@tools.diyMetadata itemType='region' itemId='00000000-0000-0000-0000-000000000000'>${object.name}</@tools.diyMetadata>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/diyMetadata?itemType=region&itemId=00000000-0000-0000-0000-000000000000&appToken=Access Token', function(data){
               console.log(data.name);
             });
             </script>
             
            diyMetadataList DIY Metadata List Retrieval Directive

            Parameter List

            • itemType: Metadata type, 【region, layout, module】
            • region: Region ID, valid when itemType is layout or module
            • showGlobal: Metadata type, 【true, false】, valid when itemType is layout or module, default is true:

            Return Result

            • list: DIY Metadata list region:
              • id : ID
              • categoryType : Category type
              • name : Name
              ,layout:
              • id : ID
              • region : Region
              • name : Name
              • template : Template
              • style : Style
              ,module:
              • id : ID
              • region : Region
              • name : Name
              • clone : Clone
              • cover : Cover
              • place : Place path
              • fragment : Fragment path
              • filePath : File path

            Usage Example

            <@tools.diyMetadataList itemType='region'><#list page.list as a>${a.name}<#sep>,</#list></@tools.diyMetadataList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/diyMetadataList?itemType=region&appToken=Access Token', function(data){
               console.log(data.name);
             });
             </script>
             
            regionData DIY Region Data Retrieval Directive

            Parameter List

            • id: Region ID
            • categoryId: Category ID

            Return Result

            • object:
              • id : ID
              • layoutList : Layout data list
              • categoryLayoutMap : Layout data list map

            Usage Example

            <@tools.diyMetadata id='00000000-0000-0000-0000-000000000000'>${object.id}</@tools.diyMetadata>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/regionData?itemId=00000000-0000-0000-0000-000000000000&appToken=Access Token', function(data){
               console.log(data.id);
             });
             </script>
             
            exception Exception Retrieval Directive

            Return Result

            • object: Exception string

            Usage Example

            <@tools.exception>${object}</@tools.exception>

            executeScript Script Execution Directive

            Parameter List

            • command: Command 【sync.bat, sync.sh, backupDB.bat, backupDB.sh】
            • parameters: Parameter array

            Print execution result

            Usage Example

            <@tools.executeScript command='backupdb.bat'/>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/executeScript?command=backupdb.bat&appToken=Access Token', function(data){
               console.log(data.id);
             });
             </script>
             
            fileBackupContent Backup File Content Retrieval Directive

            Parameter List

            • type: File type 【file, task, template】, default template
            • path: File path

            Return Result

            • object: File content text

            Usage Example

            <@tools.fileBackupContent type='file' path='index.html'>${object}</@tools.fileBackupContent>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/fileBackupContent?type=file&path=index.html&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            fileBackupList File Recycle Bin List Retrieval Directive

            Parameter List

            • type: File type 【file, task, template】, default template
            • path: File path
            • orderField: Sort type 【fileName, fileSize, modifiedDate, createDate】, default fileName

            Return Result

            • list: File list

            Usage Example

            <@tools.fileBackupList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileBackupList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/fileBackupList?path=/&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            fileContent File Content Retrieval Directive

            Parameter List

            • type: File type 【file, task, template】, default template
            • path: File path

            Return Result

            • object: File content text

            Usage Example

            <@tools.fileContent path='index.html'>${object}</@tools.fileContent>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/fileContent?path=index.html&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            fileExists File Existence Check Directive

            Parameter List

            • type: File type 【file, task, template】, default template
            • path: File path

            Return Result

            • object: Boolean indicating file existence

            Usage Example

            <@tools.fileExists type='file' path='/'><#list list as a>${a}<#sep>,</#list></@tools.fileExists>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/fileExists?type=file&path=/&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            fileHistoryContent File Modification History Content Retrieval Directive

            Parameter List

            • type: File type 【file, task, template】, default template
            • path: File path

            Return Result

            • object: File content text

            Usage Example

            <@tools.fileHistoryContent type='file' path='index.html/2020-01-01_01-01-000000'>${object}</@tools.fileHistoryContent>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/fileHistoryContent?type=file&path=index.html/2020-01-01_01-01-000000&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            fileHistoryList File Modification History List Retrieval Directive

            Parameter List

            • type: File type 【file, task, template】, default template
            • path: File path
            • orderField: Sort type 【fileName, fileSize, modifiedDate, createDate】, default fileName

            Return Result

            • list: File list

            Usage Example

            <@tools.fileHistoryList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileHistoryList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/fileHistoryList?path=/&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            fileList File List Retrieval Directive

            Parameter List

            • type: File type 【file, task, template】, default template
            • path: File path
            • orderField: Sort type 【fileName, fileSize, modifiedDate, createDate】, default fileName

            Return Result

            • list: File list

            Usage Example

            <@tools.fileList path='/'><#list list as a>${a.fileName}<#sep>,</#list></@tools.fileList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/fileList?path=/&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            includeLayout Include DIY Layout Directive

            Parameter List

            • id: Layout ID

            Print inclusion result

            Usage Example

            <@tools.includeLayout id='00000000-0000-0000-0000-000000000000'>${index},</@tools.includeLayout>

            includePlace Include Page Fragment Directive

            Parameter List

            • path: Path

            Print inclusion result

            Usage Example

            <@tools.includePlace path='00000000-0000-0000-0000-000000000000'/>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/includePlace?path=00000000-0000-0000-0000-000000000000.html&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            includeRegion Include DIY Region Directive

            Parameter List

            • id: Layout ID

            Print inclusion result

            Usage Example

            <@tools.includeRegion id='00000000-0000-0000-0000-000000000000' categoryId=1/>

            licenseVerify License File Verification Directive

            Parameter List

            • licenseData: License file data

            Return Result

            • result: Verification result, 【true: Verification successful, false: Verification failed】

            Usage Example

            <@tools.licenseVerify licenseData='content'>${url}</@tools.licenseVerify>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/tools/licenseVerify?licenseData=content', function(data){
             console.log(data);
            });
            </script>
             
            masterSite Master Site Judgment Directive

            Usage Example

            <@tools.masterSite>this is a master site</@tools.masterSite>

            memory Memory Monitoring Directive

            Return Result

            • freeMemory: Free memory
            • totalMemory: Total memory
            • maxMemory: Maximum memory

            Usage Example

            <@tools.memory>${totalMemory}</@tools.memory>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/tools/memory?appToken=Access Token', function(data){
             console.log(data);
            });
            </script>
             
            metadata Template Metadata Retrieval Directive

            Parameter List

            • path: Template path

            Return Result

            • object: Metadata
              • alias : Alias
              • publishPath : Static file path
              • useDynamic : Allow dynamic access
              • needLogin : Need login
              • needBody : Need body field
              • acceptParameters : Accept parameters
              • cacheTime : Cache time
              • contentType : Content type
              • extendList : Extend field list
              • parameterTypeMap : Parameter type map

            Usage Example

            <@tools.metadata path='index.html'>${object.alias}</@tools.metadata>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/metadata?path=index.html&appToken=Access Token', function(data){
               console.log(data.alias);
             });
             </script>
             
            placeMetadata Page Fragment Metadata Retrieval Directive

            Parameter List

            • path: Template path

            Return Result

            • object: Metadata
              • alias : Alias
              • size : Data size
              • adminIds : Front administrator IDs
              • allowContribute : Allow contribute
              • allowAnonymous : Allow anonymous contribute
              • coverWidth : Cover width
              • coverHeight : Cover height
              • workflowId : Workflow
              • acceptItemTypes : Accept item types
              • fieldList : System field list
              • requiredFieldList : Required field list
              • fieldTextMap : Field text map
              • extendList : Extend field list
              • metadataExtendList : Metadata extend field list

            Usage Example

            <@tools.placeMetadata path='00000000-0000-0000-0000-000000000000'>${object.alias}</@tools.placeMetadata>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/placeMetadata?path=00000000-0000-0000-0000-000000000000.html&appToken=Access Token', function(data){
               console.log(data.alias);
             });
             </script>
             
            sendEmail Send Email Directive

            Parameter List

            • email: Multiple email addresses
            • cc: Multiple CC addresses
            • bcc: Multiple BCC addresses
            • title: Title
            • templatePath: Content template path
            • content: Email content, valid when templatePath is empty
            • fileNames: Multiple attachment names
            • filePaths: Multiple file paths
            • parameters: Parameter map

            Return Result

            • result: Whether sending is allowed, 【true, false】

            Usage Example

            <@tools.sendEmail email='master@puliccms.com' title='title' content='content' parameters={"parameter1":"value1"}/>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/sendEmail?email=master@puliccms.com&title=title&content=content&parameters.parameter1=value1&appToken=Access Token', function(data){
               console.log(data.alias);
             });
             </script>
             
            systemProperties Server Parameters Directive

            Return Result

            • java.version: Java version number
            • java.vendor: Java vendor specific string
            • java.vendor.url: Java vendor URL
            • java.home: Java installation directory
            • java.class.version: Java class version number
            • java.class.path: Java classpath
            • os.name: Operating System Name
            • os.arch: Operating System Architecture
            • os.version: Operating System Version
            • file.separator: File separator (SEPARATOR on Unix)
            • path.separator: Path separator (":" on Unix)
            • line.separator: Line separator ("\n" on Unix)
            • user.name: User account name
            • user.home: User home directory
            • user.dir: User's current working directory

            Usage Example

            <@tools.systemProperties>${.vars['java.version']}</@tools.systemProperties>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/systemProperties?appToken=Access Token', function(data){
               console.log(data['java.version']);
             });
             </script>
             
            templatePlaceList Template File Page Fragment List Retrieval Directive

            Parameter List

            • path: File path

            Return Result

            • list: File path list

            Usage Example

            <@tools.templatePlaceList path='index.html'><#list list as a>${a}<#sep>,</#list></@tools.templatePlaceList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/templatePlaceList?path=index.html&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            templateRegionList Template File Page Visual Region List Directive

            Parameter List

            • path: File path

            Return Result

            • list: Visual region ID list

            Usage Example

            <@tools.templateRegionList path='index.html'><#list list as a>${a}<#sep>,</#list></@tools.templateRegionList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/templateRegionList?path=index.html&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            templateResult Template Rendering Result Directive

            Parameter List

            • parameters: Parameter map
            • templateContent: Template content
            Print rendering result

            Usage Example

            <@tools.templateResult templateContent='${name}' parameters={'name':'value'}/>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/templateResult?path=$%7Bname%7D&parameters.name=value&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            templateSearchList Template File Search List Directive

            Parameter List

            • path: File path
            • word: Search term

            Return Result

            • list: File list

            Usage Example

            <@tools.templateSearchList path='/' word='script'><#list list as a>${a.path}<#sep>,</#list></@tools.templateSearchList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/templateSearchList?path=/&word=script&appToken=Access Token', function(data){
               console.log(data);
             });
             </script>
             
            thumb Thumbnail Directive

            Parameter List

            • path: File path
            • width: Width
            • height: Height

            Print result file path

            Usage Example

            <@tools.thumb path='images/logo.jpg' width=100 height=100/>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/thumb?path=images/logo.jpg&width=100&height=100&appToken=Access Token', function(data){
               console.log(data.deviceType);
             });
             </script>
             
            userAgent User Agent Analysis Directive

            Parameter List

            • userAgent: User agent, if empty, takes the current request's user agent

            Return Result

            • object.ip: Client IP
            • object.browser: Browser
            • object.browserType: Browser type
            • object.browserVersion: Browser version
            • object.operatingSystem: Operating system
            • object.operatingSystemVersion: Operating system version
            • object.deviceType: Device type
            • object.userAgent: User agent

            Usage Example

            <@tools.userAgent>${a.deviceType}</@tools.userAgent>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/userAgent', function(data){
               console.log(data.deviceType);
             });
             </script>
             
            version Version Directive

            Return Result

            • cms: CMS version
            • revision: Revision
            • authorizationEdition: Usage authorization
            • authorizationStartDate: Authorization start date
            • authorizationEndDate: Authorization end date
            • authorizationOrganization: Authorized organization
            • cluster: Node ID
            • master: Whether management node 【true: Management node, false: Ordinary node】

            Usage Example

            <@tools.version path='/'>${a.fileName}</@tools.version>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/tools/version', function(data){
               console.log(data.cms);
             });
             </script>
             
            tradeAccount Account Query Directive

            Parameter List

            • id Account ID, returns object
              • id : ID
              • amount : Amount
              • updateDate : Update date
            • ids Multiple account IDs, comma or space separated, takes effect when id is empty, returns map(id,object)
            Usage Example

            <@trade.account id=1>${object.amount}</@trade.account>

            <@trade.account ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.account>

              <script>
               $.getJSON('${site.dynamicPath}api/directive/trade/account?id=1&appToken=Access Token', function(data){
                 console.log(data.amount);
               });
               </script>
             
            tradeAccountHistory Account History Query Directive

            Parameter List

            • id Account history ID, returns object
              • id : id
              • serialNumber : serial number
              • accountId : account id
              • userId : operate user id
              • amountChange : amount change
              • amount : amount
              • balance : balance
              • status : status(0:pend,1:pay,2:charge,3:refund)
              • description : description
              • createDate : create date
            • ids Multiple account history IDs, separated by commas or spaces, takes effect when id is empty, returns map(id,object)
            Usage Example

            <@trade.accountHistory id=1>${object.balance}</@trade.accountHistory>

            <@trade.accountHistory ids=1,2,3><#list map as k,v>${k}:${v.balance}<#sep>,</#list></@trade.accountHistory>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/accountHistory?id=1&appToken=API access authorization Token', function(data){
                console.log(data.balance);
              });
              </script>
             
            tradeAccountHistoryList Account History List Query Directive

            Parameter List

            • accountId Account ID
            • userId Operating user ID
            • status Status,【0:pre-recharge,1:consumption,2:recharge,3:refund】
            • startCreateDate Start creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • endCreateDate End creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • orderType Sort type,【asc:ascending,desc:descending】,default is creation date descending
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : total count
              • pageSize : page size
              • firstResult : first result offset
              • pageIndex : current page index
              • totalPage : total pages
              • list : result list
            • page.list List type query result entity list
              • id : id
              • serialNumber : serial number
              • accountId : account id
              • userId : operate user id
              • amountChange : amount change
              • amount : amount
              • balance : balance
              • status : status(0:pend,1:pay,2:charge,3:refund)
              • description : description
              • createDate : create date
            Usage Example

            <@trade.accountHistoryList pageSize=10><#list page.list as a>${a.amountChange}<#sep>,</#list></@trade.accountHistoryList>

              <script>
               $.getJSON('${site.dynamicPath}api/directive/trade/accountHistoryList?authToken=User login Token&authUserId=User id', function(data){
                 console.log(data.page.totalCount);
               });
               </script>
             
            tradeAccountList Account List Query Directive

            Parameter List

            • orderField Sort field,【amount:amount,updateDate:update date】,default sorts by id according to orderType
            • orderType Sort type,【asc:ascending,desc:descending】,default is descending
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : total count
              • pageSize : page size
              • firstResult : first result offset
              • pageIndex : current page index
              • totalPage : total pages
              • list : result list
            • page.list List type query result entity list
              • id : id
              • amount : amount
              • updateDate : update date
            Usage Example

            <@trade.accountList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.accountList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/accountList?pageSize=10&appToken=API access authorization Token', function(data){
             console.log(data.page.totalCount);
            });
            </script>
             
            TradeAddressDirective
            TradeAddressListDirective
            gatewayList Payment Channel Query Directive

            Parameter List Return Result

            • listPayment channel name list
            Usage Example

            <@oauth.list><#list list as a>${a}<#sep>,</#list></@oauth.list>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/gatewayList', function(data){
                console.log(data);
              });
              </script>
             
            tradeOrder Order Query Directive

            Parameter List

            • id Order ID, returns object
              • id : id
              • userId : user id
              • title : title
              • amount : amount
              • paymentId : payment id
              • address : address
              • addressee : addressee
              • telephone : telephone
              • ip : ip
              • remark : remark
              • status : status(0:pending,1:invalid,2:paid,3:refunded,4:close)
              • confirmed : confirmed
              • processed : processed
              • processUserId : process user id
              • processInfo : process info
              • updateDate : update date
              • createDate : create date
              • processDate : process date
              • paymentDate : payment date
            • ids Multiple order IDs, separated by commas or spaces, takes effect when id is empty, returns map(id,object)
            Usage Example

            <@trade.order id=1>${object.title}</@trade.order>

            <@trade.order ids=1,2,3><#list map as k,v>${k}:${v.title}<#sep>,</#list></@trade.order>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/order?id=1&appToken=API access authorization Token', function(data){
                console.log(data.title);
              });
              </script>
             
            tradeOrderHistory Order History Query Directive

            Parameter List

            • id Order history ID, returns object
              • id : id
              • orderId : order id
              • createDate : create date
              • operate : operate
              • content : content
            • ids Multiple order history IDs, separated by commas or spaces, takes effect when id is empty, returns map(id,object)
            Usage Example

            <@trade.orderHistory id=1>${object.amount}</@trade.orderHistory>

            <@trade.orderHistory ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.orderHistory>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/orderHistory?id=1&appToken=API access authorization Token', function(data){
                console.log(data.amount);
              });
              </script>
             
            tradeOrderHistoryList Order History List Query Directive

            Parameter List

            • orderId Order ID
            • startCreateDate Start creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • endCreateDate End creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • orderType Sort type,【asc:ascending,desc:descending】,default is creation date descending
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : total count
              • pageSize : page size
              • firstResult : first result offset
              • pageIndex : current page index
              • totalPage : total pages
              • list : result list
            • page.list List type query result entity list
              • id : id
              • orderId : order id
              • createDate : create date
              • operate : operate
              • content : content
            Usage Example

            <@trade.orderHistoryList orderId=1 pageSize=10><#list page.list as a>${a.content}<#sep>,</#list></@trade.orderHistoryList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/orderHistoryList?orderId=1&pageSize=10&appToken=API access authorization Token', function(data){
             console.log(data.page.totalCount);
            });
            </script>
             
            tradeOrderList Order List Query Directive

            Parameter List

            • userId User ID
            • paymentId Payment ID
            • status Status,【0:pending,1:invalid order,2:paid,3:refunded,4:closed】
            • processed Processed,【true,false】
            • startCreateDate Start creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • endCreateDate End creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • orderType Sort type,【asc:ascending,desc:descending】,default is publish date descending
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : total count
              • pageSize : page size
              • firstResult : first result offset
              • pageIndex : current page index
              • totalPage : total pages
              • list : result list
            • page.list List type query result entity list
              • id : id
              • userId : user id
              • title : title
              • amount : amount
              • paymentId : payment id
              • address : address
              • addressee : addressee
              • telephone : telephone
              • ip : ip
              • remark : remark
              • status : status(0:pending,1:invalid,2:paid,3:refunded,4:close)
              • confirmed : confirmed
              • processed : processed
              • processUserId : process user id
              • processInfo : process info
              • updateDate : update date
              • createDate : create date
              • processDate : process date
              • paymentDate : payment date
            Usage Example

            <@trade.orderList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.orderList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/orderList?pageSize=10&authToken=User login Token&authUserId=User id', function(data){
             console.log(data.page.totalCount);
            });
            </script>
             
            tradeOrderProduct Order Product Query Directive

            Parameter List

            • id Order product ID, returns object
              • id : id
              • orderId : order id
              • contentId : content id
              • productId : product id
              • price : price
              • quantity : quantity
              • amount : amount
              • remark : remark
            • ids Multiple order product IDs, separated by commas or spaces, takes effect when id is empty, returns map(id,object)
            Usage Example

            <@trade.orderProduct id=1>${object.quantity}</@trade.orderProduct>

            <@trade.orderProduct ids=1,2,3><#list map as k,v>${k}:${v.quantity}<#sep>,</#list></@trade.orderProduct>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/orderProduct?id=1&appToken=API access authorization Token', function(data){
                console.log(data.quantity);
              });
              </script>
             
            tradeOrderProductList Order Product List Query Directive

            Parameter List

            • orderId Order ID
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : total count
              • pageSize : page size
              • firstResult : first result offset
              • pageIndex : current page index
              • totalPage : total pages
              • list : result list
            • page.list List type query result entity list
              • id : id
              • orderId : order id
              • contentId : content id
              • productId : product id
              • price : price
              • quantity : quantity
              • amount : amount
              • remark : remark
            Usage Example

            <@trade.orderProductList orderId=1 pageSize=10><#list page.list as a>${a.productId}<#sep>,</#list></@trade.orderProductList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/orderProductList?orderId=1&pageSize=10&appToken=API access authorization Token', function(data){
             console.log(data.page.totalCount);
            });
            </script>
             
            tradePayment Payment Order Query Directive

            Parameter List

            • id Payment order ID, returns object
              • id : id
              • userId : user id
              • amount : amount
              • description : description
              • tradeType : trade type(recharge,product)
              • serialNumber : serial number
              • accountType : account type(account,alipay,wechat)
              • accountSerialNumber : account serial number
              • ip : ip
              • status : status(0:pending pay,1:paid,2:pending refund,3:refunded,4:closed)
              • processed : processed
              • processUserId : process user id
              • updateDate : update date
              • createDate : create date
              • processDate : process date
              • paymentDate : payment date
            • ids Multiple payment order IDs, separated by commas or spaces, takes effect when id is empty, returns map(id,object)
            Usage Example

            <@trade.payment id=1>${object.amount}</@trade.payment>

            <@trade.payment ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.payment>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/payment?id=1&appToken=API access authorization Token', function(data){
                console.log(data.amount);
              });
              </script>
             
            tradePaymentHistory Payment Order History Query Directive

            Parameter List

            • id Payment order history ID, returns object
              • id : id
              • paymentId : payment id
              • createDate : create date
              • operate : operate
              • content : content
            • ids Multiple payment order history IDs, separated by commas or spaces, takes effect when id is empty, returns map(id,object)
            Usage Example

            <@trade.paymentHistory id=1>${object.content}</@trade.paymentHistory>

            <@trade.paymentHistory ids=1,2,3><#list map as k,v>${k}:${v.content}<#sep>,</#list></@trade.paymentHistory>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/paymentHistory?id=1&appToken=API access authorization Token', function(data){
                console.log(data.content);
              });
              </script>
             
            tradePaymentHistoryList Account List Query Directive

            Parameter List

            • paymentId Payment ID
            • startCreateDate Start creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • endCreateDate End creation date,【2020-01-01 23:59:59】,【2020-01-01】
            • orderType Sort type,【asc:ascending,desc:descending】,default is creation date descending
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : total count
              • pageSize : page size
              • firstResult : first result offset
              • pageIndex : current page index
              • totalPage : total pages
              • list : result list
            • page.list List type query result entity list
              • id : id
              • paymentId : payment id
              • createDate : create date
              • operate : operate
              • content : content
            Usage Example

            <@trade.paymentHistory paymentId=1 pageSize=10><#list page.list as a>${a.content}<#sep>,</#list></@trade.paymentHistory>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/paymentHistory?paymentId=1&pageSize=10&appToken=API access authorization Token', function(data){
             console.log(data.page.totalCount);
            });
            </script>
             
            tradePaymentList Payment List Query Directive

            Parameter List

            • userId User ID
            • tradeType Payment type, 【recharge: recharge, product: product】
            • serialNumber Transaction number
            • accountType Account type, 【account: account, alipay: Alipay, wechat: WeChat】
            • accountSerialNumber Account transaction number
            • status Status, 【0: pending payment, 1: paid, 2: pending refund, 3: refunded, 4: closed】
            • startCreateDate Start creation date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • endCreateDate End creation date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • orderType Sort type, 【asc: ascending, desc: descending】, default is publish date descending
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list List type query result entity list
              • id : ID
              • userId : User ID
              • amount : Amount
              • description : Description
              • tradeType : Trade type (recharge, product)
              • serialNumber : Serial number
              • accountType : Account type (account, alipay, wechat)
              • accountSerialNumber : Account serial number
              • ip : IP
              • status : Status (0: pending pay, 1: paid, 2: pending refund, 3: refunded, 4: closed)
              • processed : Processed
              • processUserId : Process user ID
              • updateDate : Update date
              • createDate : Create date
              • processDate : Process date
              • paymentDate : Payment date
            Usage Example

            <@trade.paymentList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.paymentList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/paymentList?pageSize=10&authToken=User login Token&authUserId=User ID', function(data){
             console.log(data.page.totalCount);
            });
            </script>
             
            tradeRefund Refund Query Directive

            Parameter List

            • id Refund ID, returns object
              • id : ID
              • userId : User ID
              • paymentId : Payment ID
              • amount : Apply amount
              • reason : Reason
              • updateDate : Update date
              • refundUserId : Refund user ID
              • refundAmount : Refund amount
              • status : Status (0: pending, 1: refunded, 2: cancelled, 3: refuse, 4: fail)
              • reply : Reply
              • createDate : Create date
              • processingDate : Process date
            • ids Multiple refund IDs, comma or space separated, takes effect when id is empty, returns map (id, object)
            Usage Example

            <@trade.refund id=1>${object.amount}</@trade.refund>

            <@trade.refund ids=1,2,3><#list map as k,v>${k}:${v.amount}<#sep>,</#list></@trade.refund>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/trade/refund?id=1&appToken=API access authorization Token', function(data){
                console.log(data.amount);
              });
              </script>
             
            tradeRefundList Refund List Query Directive

            Parameter List

            • userId User ID
            • paymentId Payment ID
            • refundUserId Refund operation user ID
            • status Status, 【0: pending, 1: refunded, 2: cancelled, 3: refused, 4: failed】
            • startCreateDate Start creation date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • endCreateDate End creation date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • orderType Sort type, 【asc: ascending, desc: descending】, default is creation date descending
            • pageIndex Page number
            • pageSize Items per page

            Return Result

            • page
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list List type query result entity list
              • id : ID
              • userId : User ID
              • paymentId : Payment ID
              • amount : Apply amount
              • reason : Reason
              • updateDate : Update date
              • refundUserId : Refund user ID
              • refundAmount : Refund amount
              • status : Status (0: pending, 1: refunded, 2: cancelled, 3: refuse, 4: fail)
              • reply : Reply
              • createDate : Create date
              • processingDate : Process date
            Usage Example

            <@trade.refundList pageSize=10><#list page.list as a>${a.amount}<#sep>,</#list></@trade.refundList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/trade/refundList?pageSize=10&authToken=User login Token&authUserId=User ID', function(data){
             console.log(data.page.totalCount);
            });
            </script>
             
            visitDay Visit Daily Report Query Directive

            Parameter List

            • visitDate: Visit date, 【2020-01-01】
            • visitHour: Visit hour, 【-1-23】, -1 means full day data, returns object when both parameters are not empty
              • id : ID
              • pv : Page views
              • uv : User views
              • ipviews : IP views

            Usage Example

            <@visit.day visitDate='2020-01-01' visitHour=9>${object.pv}</@visit.day>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/visit/day?visitDate=2020-01-01&visitHour=9&appToken=API access authorization Token', function(data){
                console.log(data.pv);
              });
              </script>
             
            visitDayList Visit Daily Report List Query Directive

            Parameter List

            • startVisitDate: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • endVisitDate: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • hourAnalytics: Hourly statistics, 【true, false】, default false
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : ID
              • pv : Page views
              • uv : User views
              • ipviews : IP views

            Usage Example

            <@visit.dayList hourAnalytics=false><#list page.list as a>${a.pv}<#sep>,</#list></@visit.dayList>

            <script>
             $.getJSON('${site.dynamicPath}api/directive/visit/dayList?hourAnalytics=false&appToken=API access authorization Token', function(data){
               console.log(data.page.totalCount);
             });
             </script>
             
            visitHistory Visit Record Query Directive

            Parameter List

            • id: Record ID, returns object
              • sessionId : Session ID
              • visitDate : Visit date
              • visitHour : Visit hour
              • userId : Visit user
              • ip : IP
              • userAgent : User agent browser identifier
              • url : Title
              • screenWidth : Screen width
              • screenHeight : Screen height
              • refererUrl : Referer URL
              • itemType : Item type
              • itemId : Item ID
              • createDate : Creation date
            • ids: Multiple record IDs, comma or space separated, takes effect when id is empty, returns map (id, object)
            Usage Example

            <@visit.history id=1>${object.title}</@visit.history>

            <@visit.history ids='1,2,3'><#list map as k,v>${k}:${v.title}<#sep>,</#list></@visit.history>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/visit/history?id=1&appToken=API access authorization Token', function(data){
                console.log(data.title);
              });
              </script>
             
            visitHistoryList Visit Record List Query Directive

            Parameter List

            • sessionId: Session ID
            • ip: IP
            • url: URL
            • startCreateDate: Start creation date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • endCreateDate: End creation date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • orderType: Sort type, 【asc: ascending, desc: descending】, default is creation date descending
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • sessionId : Session ID
              • visitDate : Visit date
              • visitHour : Visit hour
              • userId : Visit user
              • ip : IP
              • userAgent : User agent browser identifier
              • url : Title
              • screenWidth : Screen width
              • screenHeight : Screen height
              • refererUrl : Referer URL
              • itemType : Item type
              • itemId : Item ID
              • createDate : Creation date

            Usage Example

            <@visit.historyList hourAnalytics=false><#list page.list as a>${a.url}<#sep>,</#list></@visit.historyList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/historyList?hourAnalytics=false&appToken=API access authorization Token', function(data){
              console.log(data.page.totalCount);
            });
            </script>
             
            visitItem Visit Item Report Query Directive

            Parameter List

            • visitDate: Visit date, 【2020-01-01】
            • itemType: Visit item type, 【category, content, user, etc. from page statistics itemType】
            • itemId: Visit item ID, returns object when all three parameters are not empty
              • id : ID
              • pv : Page views
              • uv : User views
              • ipviews : IP views

            Usage Example

            <@visit.item visitDate='2020-01-01' visitHour=9>${object.pv}</@visit.item>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/visit/item?visitDate=2020-01-01&itemType=content&itemId=1&appToken=API access authorization Token', function(data){
                console.log(data.pv);
              });
              </script>
             
            visitItemList Visit Item List Query Directive

            Parameter List

            • startVisitDate: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • endVisitDate: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • dayAnalytics: Daily statistics, 【true, false】, default true
            • itemType: Item type, 【category, content, user, etc. from page statistics itemType】
            • itemId: Item ID
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : ID
              • pv : Page views
              • uv : User views
              • ipviews : IP views

            Usage Example

            <@visit.itemList itemType='content'><#list page.list as a>${a.pv}<#sep>,</#list></@visit.itemList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/itemList?itemType=content&appToken=API access authorization Token', function(data){
              console.log(data.page.totalCount);
            });
            </script>
             
            visitSession Visit Session Report Query Directive

            Parameter List

            • visitDate: Visit date, 【2020-01-01】
            • sessionId: Session ID, returns object when both parameters are not empty
              • id : ID
              • lastVisitDate : Last visit date
              • firstVisitDate : First visit date
              • ip : IP
              • pv : Page views

            Usage Example

            <@visit.session visitDate='2020-01-01' sessionId='xxxx-xxxx-xxxx'>${object.pv}</@visit.session>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/visit/session?visitDate=2020-01-01&sessionId=xxxx-xxxx-xxxx&appToken=API access authorization Token', function(data){
                console.log(data.pv);
              });
              </script>
             
            visitSessionList Visit Session Report List Query Directive

            Parameter List

            • sessionId: Session ID
            • ip: IP
            • startVisitDate: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • endVisitDate: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • orderType: Sort type, 【asc: ascending, desc: descending】, default is creation date descending
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : ID
              • lastVisitDate : Last visit date
              • firstVisitDate : First visit date
              • ip : IP
              • pv : Page views

            Usage Example

            <@visit.sessionList><#list page.list as a>${a.pv}<#sep>,</#list></@visit.sessionList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/sessionList?appToken=API access authorization Token', function(data){
              console.log(data.page.totalCount);
            });
            </script>
             
            visitUrl Visit URL Report Query Directive

            Parameter List

            • visitDate: Visit date, 【2020-01-01】
            • urlMd5: URL MD5
            • urlSha: URL SHA, returns object when all three parameters are not empty
              • id : ID
              • url : URL
              • pv : Page views
              • uv : User views
              • ipviews : IP views

            Usage Example

            <@visit.url visitDate='2020-01-01' urlMd5='md5' urlSha='sha'>${object.pv}</@visit.url>

             <script>
              $.getJSON('${site.dynamicPath}api/directive/visit/url?visitDate=2020-01-01&urlMd5=MD5&urlSha=sha&appToken=API access authorization Token', function(data){
                console.log(data.pv);
              });
              </script>
             
            visitUrlList Visit URL Report List Query Directive

            Parameter List

            • url: URL
            • startVisitDate: Start visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • endVisitDate: End visit date, 【2020-01-01 23:59:59】, 【2020-01-01】
            • pageIndex: Page number
            • pageSize: Items per page

            Return Result

            • page:
              • DEFAULT_PAGE_SIZE : Default items per page
              • MAX_PAGE_SIZE : Maximum items per page
              • totalCount : Total count
              • pageSize : Items per page
              • firstResult : Current starting position offset
              • pageIndex : Current page number
              • totalPage : Total pages
              • list : Result list
            • page.list: List type query result entity list
              • id : ID
              • url : URL
              • pv : Page views
              • uv : User views
              • ipviews : IP views

            Usage Example

            <@visit.urlList><#list page.list as a>${a.pv}<#sep>,</#list></@visit.urlList>

            <script>
            $.getJSON('${site.dynamicPath}api/directive/visit/urlList?appToken=API access authorization Token', function(data){
              console.log(data.page.totalCount);
            });
            </script>
             
            confuse Obfuscate Text

            Parameter List

            1. String
            2. Number, default is 1/5 of character count
            3. Boolean, whether HTML, default false

            Return Result

            • ConfuseResult: map{text: encrypted text, font: encrypted font}
            Usage Example Requires uploading original font file in System -> Site Configuration -> Content -> Obfuscation Original Font File
             <#assign result=confuse('Tianjin Heihe Technology Co., Ltd',11)/>
            
             <style>
                 @font-face {font-family:confuse;src:url(${result.font});}
                 #content{font-family:confuse !important;}
             </style>
             <div id="content">${(result.text)!}</div>
             
             <script>
             $.getJSON('${site.dynamicPath}api/method/confuse?parameters=aaa&appToken=API access authorization Token', function(data){
                 console.log(data);
             });
             </script>
             
            confuse Obfuscate HTML Text

            Parameter List

            1. String
            2. Number, default is 1/5 of character count

            Return Result

            • ConfuseResult: map{text: encrypted text, font: encrypted font}
            Usage Example Requires uploading original font file in System -> Site Configuration -> Content -> Obfuscation Original Font File
             <#assign result=confuseHtml('<a href="http://www.publiccms.com">publiccms</a>',11)/>
            
             <style>
                 @font-face {font-family:confuse;src:url(${result.font});}
                 #content{font-family:confuse !important;}
             </style>
             <div id="content">${(result.text?no_esc)!}</div>
             <script>
             var elements = document.querySelectorAll('#content > *');
               elements.forEach(function(element) {
                   if(element.style.fontFamily){
                       element.style.fontFamily='confuse,'+element.style.fontFamily;
                   }
               });
             </script>
             
             <script>
             $.getJSON('${site.dynamicPath}api/method/confuseHtml?parameters=aaa&appToken=API access authorization Token', function(data){
                 console.log(data);
             });
             </script>
             
            getAbsoluteUrl Get Absolute URL

              getCategoryAttribute Get Category Extended Data

              Parameter List

              1. Category ID

              Return Result

              • attribute: Category extended data (field code, value)

              Usage Example

              <#assign attribute=getCategoryAttribute(1)/<

              ${attribute.title!}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getCategoryAttribute?parameters=1', function(data){
              console.log(data.title);
              });
              </script>
               
              getCategoryAttributes Get Multiple Category Extended Data

              Parameter List

              1. Multiple category IDs

              Return Result

              • map(id, attribute: category extended data (field code, value))

              Usage Example

              <#assign attributeMap=getCategoryAttributes('1,2,3,4')/<

              ${attributeMap['1'].title!}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getCategoryAttributes?parameters=1,2,3,4', function(data){
              console.log(data);
              });
              </script>
               
              getContentAttribute Get Content Extended Data

              Parameter List

              1. Content ID

              Return Result

              • attribute: Content extended data (field code, value)

              Usage Example

              <#assign attribute=getContentAttribute(1)/<

              ${(attribute.text?no_esc)!}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=API access authorization Token&parameters=1', function(data){
              console.log(data.text);
              });
              </script>
               
              getContentAttributes Get Multiple Content Extended Data

              Parameter List

              1. Multiple content IDs

              Return Result

              • map(id, attribute: content extended data (field code, value))

              Usage Example

              <#assign attributeMap=getContentAttributes('1,2,3,4')/<

              ${attributeMap['1'].text?no_esc!}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getContentAttributes?appToken=API access authorization Token&parameters=1,2,3,4', function(data){
              console.log(data);
              });
              </script>
               
              getContentPage Get Paginated Content Result

              Parameter List

              1. Content
              2. Page number

              Return Result

              • page:
                • DEFAULT_PAGE_SIZE : Default items per page
                • MAX_PAGE_SIZE : Maximum items per page
                • totalCount : Total count
                • pageSize : Items per page
                • firstResult : Current starting position offset
                • pageIndex : Current page number
                • totalPage : Total pages
                • list : Result list
              • text: Article content

              Usage Example

              <#assign textPage=getContentPage(attribute.text,2)/<

              ${textPage.text?no_esc!} current page :${textPage.page.pageIndex}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getContentAttributes?parameters=Content&parameters=2', function(data){
              console.log(data.text);
              });
              </script>
               
              getDate Get Specific Date

              Parameter List

              1. Date type 【yesterday: yesterday, tomorrow: tomorrow, thisSunday: this Sunday, thisMonday: this Monday, lastMonday: last Monday, lastSunday: last Sunday, lastWeek: last week, lastMonth: last month, lastSeason: last quarter, lastHalfYear: half year ago, lastYear: last year, nextMonday: next Monday, nextSunday: next Sunday, nextWeek: next week, nextMonth: next month, nextSeason: next quarter, nextHalfYear: half year later, nextYear: next year】, default current time
              2. Date, 【2020-01-01 23:59:59】, 【2020-01-01】, empty for current date

              Return Result

              • date: Date
              Usage Example

              ${getDate('thisSunday','2020-01-01')}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getDate?parameters=thisSunday&parameters=2020-01-01', function(data){
              console.log(data);
              });
              </script>
               
              getDict Get Word Segmentation Dictionary

              Return Result

              • string Custom word segmentation dictionary
              Usage Example

              ${getDict()}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getDict?appToken=API access authorization Token', function(data){
              console.log(data);
              });
              </script>
               
              getDictEnable Check If Dictionary Is Enabled

              Return Result

              • boolean Whether dictionary is enabled
              Usage Example

              ${getDictEnable()}

              <script>
              $.getJSON('${site.dynamicPath}api/method/getDictEnable', function(data){
              console.log(data);
              });
              </script>
               
              getFileUploadPrefix Get

              Parameter List

                Return Result

                • url: File upload prefix

                Usage Example

                ${getFileUploadPrefix()}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getFileUploadPrefix', function(data){
                console.log(data);
                });
                </script>
                 
                getFontList Get System Font List

                Return Result

                • font list: Font name list

                Usage Example

                <#list getFontList() as font>${font}</#list>

                <script>
                $.getJSON('${site.dynamicPath}api/method/getFontList?appToken=API access authorization Token', function(data){
                console.log(data);
                });
                </script>
                 
                getHash Get Hash Value

                Parameter List

                1. String

                Return Result

                • string: Hash value

                Usage Example

                ${getHash('aaa')}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getHash?parameters=aaa', function(data){
                console.log(data);
                });
                </script>
                 
                getHtml Get Remote Page Text

                Parameter List

                1. url:
                2. Parameters, map type or string type, empty for GET request, non-empty for POST request
                3. Headers, map type

                Return Result

                • html: Page text

                Usage Example

                ${getHtml('https://www.publiccms.com/')}

                ${getHtml('https://www.publiccms.com/',"body")}

                ${getHtml('https://www.publiccms.com/',{"parameters1":"value1","parameters2":"value2"},{"headers1":"value1","headers2":"value2"})}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getHtml?appToken=API access authorization Token&parameters=https://www.publiccms.com/', function(data){
                console.log(data);
                });
                </script>
                 
                getIpRegion Get IP Region Information

                Return Result

                • string IP
                Usage Example

                ${getIpRegion('127.0.0.1')}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getIpRegion?parameters=127.0.0.1', function(data){
                console.log(data);
                });
                </script>
                 
                getIpv4Number Get IP Numeric Value

                Parameter List

                1. IP

                Return Result

                • number: Numeric value

                Usage Example

                ${getIpv4Number('127.0.0.1')}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getIpv4Number?parameters=127.0.0.1', function(data){
                console.log(data);
                });
                </script>
                 
                getIpv6Number Get IP Numeric Value

                Parameter List

                1. IP

                Return Result

                • number string: String format number

                Usage Example

                ${getIpv6Number('FF01:0:0:0:0:0:0:1101')}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getIpv4Number?parameters=FF01:0:0:0:0:0:0:1101', function(data){
                console.log(data);
                });
                </script>
                 
                getKeywords Get Word Segmentation Result

                Parameter List

                1. Complete sentence

                Return Result

                • list(string): Word segmentation result set

                Usage Example

                <#list getKeywords('This is a sentence') as a>${a}<#sep>,</#list><

                <script>
                $.getJSON('${site.dynamicPath}api/method/getKeywords?parameters=This is a sentence', function(data){
                console.log(data);
                });
                </script>
                 
                getLayoutStyle Layout Stylesheet

                Parameter List

                1. Stylesheet containing /* selecter */
                2. Selector to be replaced

                Return Result

                • style: Replaced stylesheet

                Usage Example

                ${getLayoutStyle('/* selecter */','.diy-layout')}

                <script>
                $.getJSON('${site.dynamicPath}api/method/getLayoutStyle?appToken=API access authorization Token&parameters=/* selecter */&parameters=.diy-layout', function(data){
                console.log(data);
                });
                </script>
                 
                getLicense Get License

                Return Result

                • license: License data

                  Usage Example

                  ${getLicense().domain}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getLicense?appToken=API access authorization Token, function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getLicenseData Get License Data

                  Return Result

                  • string: Base64 encoded license data

                  Usage Example

                  ${getLicenseData()}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getLicenseData, function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getMd5 Get MD5 Value

                  Parameter List

                  1. String

                  Return Result

                  • string: MD5 value

                  Usage Example

                  ${getMd5('aaa')}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getMd5?parameters=aaa', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getPage Get Paginated URL

                  Parameter List

                  1. url
                  2. pageIndex: Page number
                  3. string: Pagination parameter, dynamic URL pagination parameter name, empty returns static URL pagination result

                  Return Result

                  • url: URL with pagination

                  Usage Example

                  ${getPage('https://www.publiccms.com/introduction/index_3.html',2)}

                  ${getPage('https://search.publiccms.com/?word=cms',2,'pageIndex')}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getHash?parameters=https://www.publiccms.com/introduction/index_3.html&parameters=2', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getParameterTypeList - Get parameter type list

                  Return result

                  • list: Parameter type names

                  Usage example

                  <#list getParameterTypeList() as a>${a}<#sep>,</#list>

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getParameterTypeList?appToken=API access token', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getPlaceAttribute - Get recommended content extended data

                  Parameter list

                  1. Recommended content ID

                  Return result

                  • attribute: Recommended content extended data (field code, value)

                  Usage example

                  <#assign attribute=getContentAttribute(1)/<

                  ${(attribute.description)!}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getContentAttribute?appToken=API access token&parameters=1', function(data){
                  console.log(data.description);
                  });
                  </script>
                   
                  getPlaceAttributes - Get multiple recommended content extended data

                  Parameter list

                  1. Multiple recommended content IDs

                  Return result

                  • map(id, attribute: Recommended content extended data (field code, value))

                  Usage example

                  <#assign attributeMap=getPlaceAttributes('1,2,3,4')/<

                  ${attributeMap['1'].description!}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getPlaceAttributes?parameters=1,2,3,4', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getPrivateUrl - Get private file absolute path

                  Parameter list

                  1. url, file URL
                  2. expiryMinutes, expiration minutes, optional
                  3. string, file name, optional

                  Return result

                  • url: Absolute path URL

                  Usage example

                  ${getPrivateUrl('index.html')}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getPrivateUrl?appToken=API access token&parameters=index.html', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getProcessTypeList - Get parameter type list

                  Return result

                  • list: Parameter type names

                  Usage example

                  <#list getProcessTypeList() as a>${a}<#sep>,</#list>

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getProcessTypeList?appToken=API access token', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getRandom - Get random number

                  Parameter list

                  1. number: Maximum number, optional

                  Return result

                  • number: Random number

                  Usage example

                  ${getRandom()}

                  ${getRandom(100)}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getRandom?parameters=100', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  getSha1 - Get SHA1

                  Parameter list

                  1. String

                  Return result

                  • string: SHA1 value

                  Usage example

                  ${getSha1('aaa')}

                  <script>
                  $.getJSON('${site.dynamicPath}api/method/getSha1?parameters=aaa', function(data){
                  console.log(data);
                  });
                  </script>
                   
                  GetSha2 - Get SHA2

                    getSha256 - Get SHA256

                    Parameter list

                    1. String

                    Return result

                    • string: SHA256 value

                    Usage example

                    ${getSha256('aaa')}

                    <script>
                    $.getJSON('${site.dynamicPath}api/method/getSha256?parameters=aaa', function(data){
                    console.log(data);
                    });
                    </script>
                     
                    getSha512 - Get SHA512

                    Parameter list

                    1. String

                    Return result

                    • string: SHA512 value

                    Usage example

                    ${getSha512('aaa')}

                    <script>
                    $.getJSON('${site.dynamicPath}api/method/getSha512?parameters=aaa', function(data){
                    console.log(data);
                    });
                    </script>
                     
                    getSitefile - Get site file description

                    Parameter list

                    1. File name

                    Return result

                    • sitefile:

                      Usage example

                      ${(getSitefile('aaa-site.zip').name)!}

                      <script>
                      $.getJSON('${site.dynamicPath}api/method/getSitefile?appToken=API access token&parameters=aaa-site.zip', function(data){
                      console.log(data);
                      });
                      </script>
                       
                      getSkipWord - Get dictionary ignored words

                      Return result

                      • string: Dictionary ignored words
                      Usage example

                      ${getSkipWord()}

                      <script>
                      $.getJSON('${site.dynamicPath}api/method/getRandom?appToken=API access token', function(data){
                      console.log(data);
                      });
                      </script>
                       
                      getSleep - Sleep for a period

                      Parameter list

                      1. number: Sleep time 0-60 seconds

                      Return result

                      • boolean: Whether slept

                      Usage example

                      ${getSleep(5)}

                      getTemplateResult - Get template parsing result

                      Parameter list

                      1. Template content

                      Return result

                      • string: Parsing result

                      Usage example

                      ${getTemplateResult('${.now}')}

                      <script>
                      $.getJSON('${site.dynamicPath}api/method/getDate?appToken=API access token&parameters=${.now}', function(data){
                      console.log(data);
                      });
                      </script>
                       
                      getTextFromHtml - Get text from HTML

                      Parameter list

                      1. HTML content

                      Return result

                      • string: Text result

                      Usage example

                      ${getTextFromHtml('<a href="http://www.publiccms.com/">publiccms</a>')}

                      <script>
                      $.getJSON('${site.dynamicPath}api/method/getTextFromHtml?parameters=<a href="http://www.publiccms.com/">publiccms</a>', function(data){
                      console.log(data);
                      });
                      </script>
                       
                      getUUID - Get UUID

                      Return result

                      • string: Random UUID

                      Usage example

                      ${getUUID()}

                      <script>
                      $.getJSON('${site.dynamicPath}api/method/getUUID', function(data){
                      console.log(data);
                      });
                      </script>
                       
                      getUrl - Get URL absolute path

                      Parameter list

                      1. URL prefix
                      2. url, when the second is empty, treat the first parameter as URL

                      Return result

                      • url: Absolute path URL

                      Usage example

                      ${getUrl(site.sitePath,'index.html')} ${getUrl('index.html')}

                      <script>
                      $.getJSON('${site.dynamicPath}api/method/getUrl?parameters=index.html', function(data){
                      console.log(data);
                      });
                      </script>
                       
                      getXml - Get XML node

                      Parameter list

                      1. string: XML text

                      Return result

                      • xml: XML model

                      Usage example

                      ${getXml('<xml><data>value</data></xml>').xml.data}