Hello KK,
I am attempting to order dynamic folders by their page count and show only the top 5 folders like this:
The above code works fine except the limit parameter doesn't work. The limit only works when I add
I am attempting to order dynamic folders by their page count and show only the top 5 folders like this:
- Code: Select all
<cms:set categories_count='0' />
<cms:folders masterpage="products.php" paginate='1' limit='5' depth='0' orderby="count" order="desc" >
{
"id": <cms:show k_folder_id />,
"attributes": {
"title": <cms:escape_json><cms:show k_folder_title /></cms:escape_json>,
"description": "",
"createdAt": "<cms:date k_page_creation_date format='Y-m-d H:i:s' />",
"updatedAt": "<cms:date k_page_modification_date />",
"publishedAt": "<cms:date k_page_date />",
"isSubCategory": true,
"slug": <cms:escape_json><cms:show k_folder_name /></cms:escape_json>,
"products": {
"data": {
"attributes": {
"count": <cms:show k_folder_pagecount />
}
}
},
"image": <cms:escape_json><cms:show k_folder_image /></cms:escape_json>
}
}<cms:incr categories_count /><cms:if categories_count!=k_total_folders>,</cms:if>
</cms:folders>
The above code works fine except the limit parameter doesn't work. The limit only works when I add
- Code: Select all
hierarchical='1'