Skip to content

Commit

Permalink
Add readme section on column markup
Browse files Browse the repository at this point in the history
  • Loading branch information
daun committed Jan 3, 2020
1 parent 5011368 commit 6e4fbb5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ Display a collection of pages in a table. Supply either a PageArray or a selecto
]
```

#### Complex markup

Columns support dot syntax and curly brackets to access sub-fields:

```php
'columns' => [
'category.title' => 'Category',
'createdUser.name' => 'Created by',
'On {location.street} in {location.city}' => 'Location',
]
```

#### Image columns

Pass the name of any image field as the column key to display thumbnails. Only the first image is shown by default, but you can change the number of images shown by setting the `maxImageNum` option.
Expand Down

0 comments on commit 6e4fbb5

Please sign in to comment.