Skip to content

Commit

Permalink
Merge branch '1.1'
Browse files Browse the repository at this point in the history
* 1.1:
  Fix title
  Fix titles and add template support
  • Loading branch information
pamil committed Feb 22, 2018
2 parents 3d9ff2b + 53bd2e2 commit 44aaecf
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 deletions docs/cookbook/entities/custom-translatable-model.rst
Expand Up @@ -448,7 +448,20 @@ Remember to import your grid in the ``app/config/grids/grids.yml`` file which ha
imports:
- { resource: "grids/grids.yml" }
10. Define routing for entity administration
10. Create template
-------------------

.. code-block:: php
# AppBundle/Resources/views/Supplier/_form.yml
{% from '@SyliusAdmin/Macro/translationForm.html.twig' import translationForm %}
{{ form_errors(form) }}
{{ translationForm(form.translations) }}
{{ form_row(form.enabled) }}
11. Define routing for entity administration
--------------------------------------------

Having a grid prepared we can configure routing for the entity administration:
Expand All @@ -469,6 +482,8 @@ should be also included in the ``app/config/routing.yml``.
vars:
all:
subheader: app.ui.supplier
templates:
form: AppBundle:Supplier:_form.html.twig
index:
icon: 'file image outline'
type: sylius.resource
Expand All @@ -486,15 +501,15 @@ should be also included in the ``app/config/routing.yml``.
resource: 'routing/admin.yml'
prefix: /admin
9. Add entity administration to the admin menu
----------------------------------------------
12. Add entity administration to the admin menu
-----------------------------------------------

.. tip::

See :doc:`how to add links to your new entity administration in the administration menu </customization/menu>`.

9. Check the admin panel for your changes
-----------------------------------------
13. Check the admin panel for your changes
------------------------------------------

.. tip::

Expand Down

0 comments on commit 44aaecf

Please sign in to comment.