Skip to content

Commit

Permalink
add thumbnail size readme
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Sep 16, 2017
1 parent cb4aa4e commit c25c442
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ The Toolbox provides a lot of [ready-to-use Bricks](docs/11_ElementsOverview.md)
- [Toolbox Elements Overview](docs/11_ElementsOverview.md)
- [Conditional Logic in Configuration](docs/12_ConditionalLogic.md)
- [CK-Editor Configuration](docs/13_CkEditor.md)
- [Image Thumbnails Strategy](docs/14_ImageThumbnails.md)
- [Create a Custom Brick](docs/10_CustomBricks.md)
- [Theme / Layout](docs/30_ToolboxTheme.md)
- [Overriding Views](docs/31_OverridingViews.md)
Expand Down
23 changes: 23 additions & 0 deletions docs/14_ImageThumbnails.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Image Thumbnails

To stay organized, the ToolboxBundle provides a dedicated configuration and a simple helper for image thumbnails.
Every required thumbnail size is defined in the [toolbox configuration](https://github.com/dachcom-digital/pimcore-toolbox/blob/master/src/ToolboxBundle/Resources/config/pimcore/image_thumbnails.yml).
So it's easy for you to simplify or change the [Image Thumbnail](https://www.pimcore.org/docs/5.0.0/Assets/Working_with_Thumbnails/Image_Thumbnails.html) reference.

Although this is just an optional feature, it makes sense to use the view helper in your project and custom bricks.

## Configuration

```yaml
toolbox:
image_thumbnails:
# get merged or overrides the toolbox defaults
gallery_element: 'myOverriddenGalleryThumbnailSize'
my_thumbnail_size: 'myThumbnailSize'
```
## View Helper:
```twig
{{ asset.getThumbnail(toolbox_get_image_thumbnail('my_thumbnail_size')) }}
```

0 comments on commit c25c442

Please sign in to comment.