8000 Improving doc · symfony/symfony-docs@49b969a · GitHub
[go: up one dir, main page]

Skip to content

Commit 49b969a

Browse files
committed
Improving doc
1 parent 1d1658d commit 49b969a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

configuration/multiple_kernels.rst

L 8000 ines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ they can share common bundles, configurations, and code if desired. The optimal
4242
needs and requirements, so it's up to you to decide which best suits your project.
4343

4444
First, let's create a new ``apps`` directory at the root of your project, which will hold all the necessary applications.
45-
Each application will follow a simplified directory structure:
45+
Each application will follow a simplified directory structure like the one described in :ref:`Symfony Best Practice </best_practices>`:
4646

4747
.. code-block:: text
4848
@@ -292,18 +292,18 @@ Then, run `composer auto-scripts` to test it!
292292
Rendering Templates
293293
-------------------
294294

295-
If you adhere to the Symfony Best Practices, the shared Kernel templates will be located in the ``templates/`` directory
296-
at the project's root. For API-specific templates, you can create a new directory in ``apps/api/templates/``, which you
297-
will need to configure manually under the API application:
295+
Let's assume there is now another app called ``admin``. If you follow the :ref:`Symfony Best Practices </best_practices>`, the shared Kernel
296+
templates will be located in the ``templates/`` directory at the project's root. For admin-specific templates, you can
297+
create a new directory ``apps/admin/templates/`` which you will need to manually configure under the Admin application:
298298

299299
.. code-block:: yaml
300300
301-
# apps/api/config/packages/twig.yaml
301+
# apps/admin/config/packages/twig.yaml
302302
twig:
303303
paths:
304-
'%kernel.project_dir%/apps/api/templates': Api
304+
'%kernel.project_dir%/apps/admin/templates': Admin
305305
306-
Then, use this Twig namespace to reference any template within the API application only, for example ``@Api/schema/doc.json.twig``.
306+
Then, use this Twig namespace to reference any template within the Admin application only, for example ``@Admin/form/fields.html.twig``.
307307

308308
Running Tests
309309
-------------
@@ -377,9 +377,9 @@ configuration and permissions. To do that, you will have to repeat the step 1 on
377377
├─ apps/
378378
│ ├─ admin/
379379
│ │ ├─ config/
380-
│ │ │ ├─ bundles.php
380+
│ │ │ ├─ bundles.php
381381
│ │ │ ├─ routes.yaml
382-
│ │ │ └─ services.yaml
382+
│ │ │ └─ services.yaml
383383
│ │ └─ src/
384384
│ └─ api/
385385
│ └─ ...

0 commit comments

Comments
 (0)
0