Merge pull request #8198 from Mipme/fixingTwigGridType

[Documentation][SyliusGridBundle] fixing twig field type
This commit is contained in:
Kamil Kokot 2017-06-27 13:11:17 +02:00 committed by GitHub
commit cf412b91c5

View file

@ -60,6 +60,12 @@ You just have to specify the template and it will be rendered with the ``data``
In the ``:Grid/Column:_prettyName.html.twig`` template, you just need to render the value for example as you see below:
.. code-block:: twig
<strong>{{ data }}</strong>
If you wish to render more complex grid fields just redefine the path of the field to root ``path: .`` in the yaml and you can access all attributes of the object instance:
.. code-block:: twig
<strong>{{ data.name }}</strong>