# Loops in columns + lines (grids)

If you have a list of items which you want to display in multiple columns and multiple lines, you may use our columns features.

{% hint style="info" %}
The beauty of it, is that page numbers will increment automatically, and page breaks will be perfectly fitted !&#x20;
{% endhint %}

Example data :

&#x20;

```plaintext
{"images": [
 {
   "title": "Shirt",
   "image": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTjHWwPvOYKj1hg5y1UdGQw1RbG9HpKwpOZmw&s",
   "description" : "red, long sleeves"
 },
 {
   "title": "Dress",
   "image": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTjHWwPvOYKj1hg5y1UdGQw1RbG9HpKwpOZmw&s",
   "description" : "blue and green"
 },
 {
   "title": "trousers",
   "image": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTjHWwPvOYKj1hg5y1UdGQw1RbG9HpKwpOZmw&s",
   "description" : "blue jeans"
 }
]
}
```

&#x20;In your template, you have to add Col1, Col2, Col3 to each one of your variables, as shown below:

| <p>{#images}{%imageCol1}</p><p>{titleCol1}</p><p>{descriptionCol1}</p> | <p>{%imageCol2}</p><p>{titleCol2}</p><p>{descriptionCol2}</p> | <p>{%imageCol3}</p><p>{titleCol3}</p><p>{descriptionCol3}{/images}</p> |
| ---------------------------------------------------------------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------- |

\
And in addition to that you have to provide the number of columns in the plugin JSON data, like this:    "images.nbColumns" :3,\
Then just create your JSON loop as usual.\
You can see a demo on this page : <https://docxtopdfplugintest.bubbleapps.io/version-test/image_loop?debug_mode=true>\
Editor: <https://bubble.io/page?type=page&name=image_loop&id=docxtopdfplugintest&tab=tabs-2>

<table data-header-hidden><thead><tr><th></th><th width="78.33333333333331"></th><th></th></tr></thead><tbody><tr><td><strong>Template</strong></td><td> </td><td><strong>Result</strong></td></tr><tr><td></td><td><p><span data-gb-custom-inline data-tag="emoji" data-code="27a1">➡️</span></p><p> </p></td><td><img src="https://3610933556-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtICyn0rKkxEa2DzPEdWY%2Fuploads%2Fr4DnY8NRQFFW3bux8sO7%2Fimage.png?alt=media&#x26;token=608d3df0-084c-4434-95c3-0cb96141ad50" alt="" data-size="original"></td></tr></tbody></table>

&#x20;
