Prechádzať zdrojové kódy

Replace url() with path() for dashboard url

It's not better to use the relative dashboard url generated with the
path() twig function instead of the absolute url using the url()
function?

I noticed in a project of mine (the hosting server have some special
settings regarding the public hostname) that the dashboard url is wrong
generated using url(), with path() it is perfect.
samuel4x4 10 rokov pred
rodič
commit
c452e75a07
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      Resources/views/standard_layout.html.twig

+ 1 - 1
Resources/views/standard_layout.html.twig

@@ -104,7 +104,7 @@ file that was distributed with this source code.
                 {% block logo %}
                     {% if admin_pool is defined %}
                         {% spaceless %}
-                        <a class="logo" href="{{ url('sonata_admin_dashboard') }}">
+                        <a class="logo" href="{{ path('sonata_admin_dashboard') }}">
                             {% if 'single_image' == admin_pool.getOption('title_mode') or 'both' == admin_pool.getOption('title_mode') %}
                                 <img src="{{ asset(admin_pool.titlelogo) }}" alt="{{ admin_pool.title }}">
                             {% endif %}