From 0a21296edec8d5a47233bb43204e418b56e131f6 Mon Sep 17 00:00:00 2001 From: prasad-sunkara <64099163+prasad-sunkara@users.noreply.github.com> Date: Sat, 25 Nov 2023 06:59:01 -0500 Subject: [PATCH] Update iteration-tags.md Corrected tablerow parameters description and examples. --- .../configure/liquid/iteration-tags.md | 72 +++++++++++++------ 1 file changed, 51 insertions(+), 21 deletions(-) diff --git a/power-pages-docs/configure/liquid/iteration-tags.md b/power-pages-docs/configure/liquid/iteration-tags.md index 7d9ebeea0..957e13e41 100644 --- a/power-pages-docs/configure/liquid/iteration-tags.md +++ b/power-pages-docs/configure/liquid/iteration-tags.md @@ -234,6 +234,24 @@ Child Page 4 These parameters of tablerowcan be used alone, or in combination. +**cols** + +Dictates how many rows the generated table should have. + +**Code** + +``` + + +{% tablerow child_page in page.children cols:2 %} + +{{ child_page.title }} + +{% endtablerow %} + +
+``` + **Output** ``` @@ -274,24 +292,6 @@ Child Page 4 ``` -**Code** - -``` - - -{% tablerow child_page in page.children cols:2 %} - -{{ child_page.title }} - -{% endtablerow %} - -
-``` - -Dictates how many rows the generated table should have. - -**cols** - **limit** Exits the loop after a given number of items. @@ -332,11 +332,11 @@ Child Page 2 - -offset ``` -Starts the loop at given index. +**offset** + +Starts the loop at a given index. **Code** @@ -394,6 +394,36 @@ Defines a range of numbers to loop through. ``` +**Output** + +``` + + + + + + + + + + + + +
+ +Child Page 1 + + + +Child Page 2 + + + +Child Page 3 + +
+``` + ### See also - [Control flow tags](control-flow-tags.md)