Преглед изворни кода

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 година
родитељ
комит
c452e75a07
1 измењених фајлова са 1 додато и 1 уклоњено
  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 %}