mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 09:02:12 +00:00
Merge pull request #8198 from Mipme/fixingTwigGridType
[Documentation][SyliusGridBundle] fixing twig field type
This commit is contained in:
commit
cf412b91c5
1 changed files with 6 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue