]> git.parisson.com Git - mezzo.git/commitdiff
We can add text links to the header now
authorJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Tue, 7 Feb 2017 14:02:23 +0000 (15:02 +0100)
committerJérémy Fabre <Jeremy@iMacdeJeremy2.fritz.box>
Tue, 7 Feb 2017 14:02:23 +0000 (15:02 +0100)
app/templates/pages/menus/header.html

index aa46ff85c094b9625e91cdcefd09b1b76d5cc54e..22611127a4a52f95b4b9ebd1af1925993b1f75ae 100644 (file)
         {% endif %}
         {% if page.in_menu %}
             {% if page.content_model == "link" %}
-                <li class="nav-header__item nav-header__item--image">
-                    {% with page.link.link_images.all|first as link_image %}
-                        <a href="{{ page.get_absolute_url }}"{% if 'http' in page.link.slug %} target="_blank"{% endif %} title="{{ page.title }}"><img width="83" height="65" src="{{ MEDIA_URL }}{% thumbnail link_image.image 166 130 %}" /></a>
-                    {% endwith %}
-                </li>
+                {% with page.link.link_images.all|first as link_image %}
+                    {% if link_image %}
+                        <li class="nav-header__item nav-header__item--image">
+                            <a href="{{ page.get_absolute_url }}"{% if 'http' in page.link.slug %} target="_blank"{% endif %} title="{{ page.title }}"><img width="83" height="65" src="{{ MEDIA_URL }}{% thumbnail link_image.image 166 130 %}" /></a>
+                        </li>
+                    {% else %}
+                        <li class="nav-header__item">
+                            <a class="nav-header__item-link" href="{{ page.get_absolute_url }}"{% if 'http' in page.link.slug %} target="_blank"{% endif %} title="{{ page.title }}">{{ page.title }}</a>
+                        </li>
+                    {% endif %}
+                {% endwith %}
             {% else %}
                 <li class="nav-header__item">
                     <a class="nav-header__item-link{% if page.is_current_or_ascendant %} active{% endif %}" href="{{ page.get_absolute_url }}" title="{{ page.title }}">{{ page.title }}</a>