Skip to content

Commit

Permalink
doc:
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 committed Jul 5, 2024
1 parent 4e3a290 commit 9f193f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
19 changes: 1 addition & 18 deletions docs/dev/client-helper-bundle/twig.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,7 @@

## emsch_assets

For managing environment based assets.

This function will unzip the file (hash) in /public/{saveDir}/**hash** (if not exists).
The default value of the saveDir is **bundles**.
```twig
{{- emsch_assets('hash', 'saveDir') -}}
```

After it will create a symlink /public/{saveDir}/**environment_alias** to the hash directory.
Now you have the possibility to add the following rule in your apache vhost.
```
Alias /bundles/emsch_assets /opt/src/public/bundles/**$ENVIRONMENT_ALIAS**
```

Example base template.
```twig
<link rel="stylesheet" href="{{ asset('bundles/emsch_assets/css/app.css') }}">
```
This function is deprecated and should be replaced by `emsch_assets_version`

## emsch_assets_version

Expand Down
2 changes: 1 addition & 1 deletion docs/dev/common-bundle/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Regarding the file's type, it's possible to generate response from a source file
- `_disposition`: will specify to the browser if it should render the asset or ask the user to save it locally:
- with the value `attachment` the browser will propose to save it to the user with a `save as ...` dialog
- with the value `inline` (default value) the browser will try to display it directly in the browser if the mime-type is supported
- `_file_names` (array of file path) if provided the first file found will be used instead of the original asset
- `_file_names` (array of file path) if provided the first file found will be used instead of the original asset. A file path can be a path to a local file, but most likely it's a path in a zip archive with the format `{hash of the archive}:{path to file}`; e.g. `8ef54d1e170aede4fa78687f466f35bb6292f4ad:img/banners/banner-home.jpg`
- `_config_type` specify the processor that should process the asset. If not define the asset itself will be delivered
- `image` will generate an image (PNG, SVG or JPEG) using the [image processor](#Image processor)
- `zip` will generate a ZIP archive the [ZIP processor](#ZIP processor)
Expand Down

0 comments on commit 9f193f2

Please sign in to comment.