diff --git a/config/alfresco/templates/webscripts/org/alfresco/repository/generic-paged-results.lib.ftl b/config/alfresco/templates/webscripts/org/alfresco/repository/generic-paged-results.lib.ftl index 3801fd73e8..66187af094 100644 --- a/config/alfresco/templates/webscripts/org/alfresco/repository/generic-paged-results.lib.ftl +++ b/config/alfresco/templates/webscripts/org/alfresco/repository/generic-paged-results.lib.ftl @@ -1,33 +1,31 @@ <#-- - - Renders paged results information. - The passed in data object should contain following attributes: - pageSize: the number of elements requested to be returned (forms part of the request) - startIndex: the index of the first element to be returned (forms part of the request) - total: the total number of elements in the result set - itemCount: the actual number of elements returned - items: the result elements - + Renders paged results information. + The passed in data object should contain following attributes: + pageSize: the number of elements requested to be returned (forms part of the request) + startIndex: the index of the first element to be returned (forms part of the request) + total: the total number of elements in the result set + itemCount: the actual number of elements returned + items: the result elements + Usage: - <#import "generic-paged-results.lib.ftl" as gen/> - { - <@gen.pagedResults data=data ; item> - output of the individual item, for example by calling another macro: - <@yourLib.itemJSON item=item /> - - } - + <#import "generic-paged-results.lib.ftl" as gen/> + { + <@gen.pagedResults data=data ; item> + output of the individual item, for example by calling another macro: + <@yourLib.itemJSON item=item /> + + } --> <#macro pagedResults data> - "total" : ${data.total?c}, - "pageSize" : ${data.pageSize?c}, - "startIndex" : ${data.startIndex?c}, - "itemCount" : ${data.itemCount?c}, - "items": - [ - <#list data.items as item> - <#nested item> - <#if item_has_next>, - - ] + "total": ${data.total?c}, + "pageSize": ${data.pageSize?c}, + "startIndex": ${data.startIndex?c}, + "itemCount": ${data.itemCount?c}, + "items": + [ + <#list data.items as item> + <#nested item> + <#if item_has_next>, + + ]