Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Doc for loading Snippets in Subfolder #615

Merged
merged 5 commits into from
May 14, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions cookbook/override-dir-structure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,23 @@ generated it with ``npm install`` and ``npm run build`` into your new directory.
sulu_admin:
json_manifest_path: "%kernel.project_dir%/public/your/new/path/manifest.json"
niklasnatter marked this conversation as resolved.
Show resolved Hide resolved


Load Snippets from a Subfolder
TheCadien marked this conversation as resolved.
Show resolved Hide resolved
------------------------------
By the means of configuration in `config/packages/sulu_admin.yaml` according to the following scheme
it is also possible to load snippet templates from custom folders.

.. code-block:: yaml

sulu_core:
content:
structure:
paths:
event_snippets:
path: "%kernel.project_dir%/config/template/events/snippets/"
type: "snippet"

In this example, a new Events folder has been specified. It is important that the key for the configuration remains unique for each config.

.. _Symfony documentation: https://symfony.com/doc/current/configuration/override_dir_structure.html
.. _public-dir: https://symfony.com/doc/current/configuration/override_dir_structure.html#override-the-public-directory