Skip to content

Commit

Permalink
Merge branch '2.6' of github.com:sulu/sulu-docs into 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-schranz committed Jun 25, 2024
2 parents 2b7693b + b0d225c commit c04a950
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
2 changes: 2 additions & 0 deletions book/localization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ For the developer the only touching points with localizations are the
configuration and the eventual use of a language switcher on the homepage.
For the language switcher the ``localizations`` variable delivered to the twig template
can be used, which contains an associative array with the parameters ``locale``, ``url`` and ``country``.
The currently active locale can be obtained from the underlying Symfony Request
object with ``app.locale``.

.. code-block:: twig
Expand Down
7 changes: 3 additions & 4 deletions book/templates.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ The template of a page can be selected in the admin interface:

.. figure:: ../img/templates-selection.png

.. Caution::
.. note::

A template is shown in the dropdown only if both the XML and the Twig file
exist! If you can't see your template, double-check the directories
``config/templates/pages`` and ``templates/pages``.
If you don't want a template to appear in this list, use the ``excluded-templates`` node in the webspace configuration file.
Have a closer look at `Setup a Webspace <webspaces.html#urls>`_ for more details.

The name displayed in the dropdown is configured in the ``<meta>`` section of
the XML:
Expand Down
4 changes: 2 additions & 2 deletions bundles/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ Refresh references
------------------

The references are automatically updated upon saving an entity. You also have the option to manually update the
references by executing the `bin/console sulu:references:refresh` command. This command optionally accepts the
references by executing the `bin/console sulu:reference:refresh` command. This command optionally accepts the
<resource-key> argument. When this argument is provided, only the references for the specified resource key will be refreshed.

.. code-block:: bash
bin/console sulu:references:refresh <resource-key>
bin/console sulu:reference:refresh <resource-key>
.. note::

Expand Down
3 changes: 2 additions & 1 deletion cookbook/web-server/apache.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Let's add the Apache configuration file for the `sulu.lo` domain.
ExpiresByType image/svg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/avif "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType image/vnd.microsoft.icon "access plus 1 year"
Expand All @@ -74,7 +75,7 @@ Let's add the Apache configuration file for the `sulu.lo` domain.
</IfModule>
<IfModule mod_headers.c>
<filesMatch ".(ico|css|js|gif|webp|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$">
<filesMatch ".(ico|css|js|gif|webp|avif|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$">
Header set Cache-Control "public, max-age=31536000, immutable"
</filesMatch>
Expand Down
2 changes: 1 addition & 1 deletion cookbook/web-server/nginx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ The Nginx configuration could look something like.
}
# expire
location ~* \.(?:ico|css|js|gif|webp|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$ {
location ~* \.(?:ico|css|js|gif|webp|avif|jpe?g|png|svg|woff|woff2|eot|ttf|mp4)$ {
# try to serve file directly, fallback to index.php
try_files $uri /index.php$is_args$args;
access_log off;
Expand Down

0 comments on commit c04a950

Please sign in to comment.