Browse Source

use the breadcrumb to generate a proper page title

Thomas 14 years ago
parent
commit
39335e99d9
1 changed files with 13 additions and 1 deletions
  1. 13 1
      Resources/views/standard_layout.twig.html

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

@@ -31,7 +31,19 @@ file that was distributed with this source code.
         <script src="{{ asset('bundles/sonatabaseapplication/qtip/jquery.qtip-1.0.0-rc3.min.js') }}" type="text/javascript"></script>
         <script src="{{ asset('bundles/sonatabaseapplication/base.js') }}" type="text/javascript"></script>
 
-        <title>Administration</title>
+        <title>
+            {% block title %} Admin
+                {% if breadcrumbs is defined %}
+                    -
+                    {% for label, uri in breadcrumbs %}
+                        {% if not loop.first  %}
+                            &gt;
+                        {% endif %}
+                        {{ label }}
+                    {% endfor %}
+                {% endif %}
+            {% endblock %}
+        </title>
     </head>
     <body>