瀏覽代碼

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 %}