Commit 7ddf2c86 authored by Tobias Buckdahn's avatar Tobias Buckdahn

Process "link" header field (to avoid redirect ignored by search plugin)

parent c6456184
......@@ -17,7 +17,7 @@
<ul class="navbar-nav text-center ml-auto">
{% for item in collection %}
<li class="nav-item show mr-sm-1 mr-xl-2">
<a class="nav-link" href="{{ item.redirect ?: item.url }}" title="{{ item.menu }}">
<a class="nav-link" href="{{ item.redirect ?: item.header.link ?: item.url }}" title="{{ item.menu }}">
<span class="d-inline-block"><img class="img-fluid" src="{{ item.media[item.header.icon].resize(32, 32).url }}" alt="{{ item.menu }}"></span>
<span class="d-none d-md-inline-block {{ item.active ? 'font-weight-bold' }}">{{ item.menu }}</span>
</a>
......
......@@ -7,7 +7,7 @@
{% if item_show_image %}
{% block item_image %}
<a href="{{ page.redirect ?: page.url }}" class="{{ item_image_link_classes ?: 'card-image test' }}">
<a href="{{ page.redirect ?: page.header.link ?: page.url }}" class="{{ item_image_link_classes ?: 'card-image test' }}">
{% set item_image = item_image ?: page.header.image ?: 'themes://brick-camp/images/no_image.png' %}
<img
class="{{ item_image_classes ?: 'card-img-top img-fluid w-auto' }}"
......@@ -30,12 +30,12 @@
{% if item_show_footer %}
<div class="card-footer {{ page.header.icon ? 'd-flex justify-content-between align-items-center py-1 pr-1' }}">
{% block item_footer %}
<a href="{{ page.redirect ?: page.url }}" class="text-dark" tabindex="-1">
<a href="{{ page.redirect ?: page.header.link ?: page.url }}" class="text-dark" tabindex="-1">
<span class="caption text-truncate {{ page.header.icon ? '' : 'd-block' }}">{{ page.title }}</span>
</a>
{% if page.header.icon %}
<a href="{{ page.redirect ?: page.url }}" tabindex="-1">
<a href="{{ page.redirect ?: page.header.link ?: page.url }}" tabindex="-1">
<img class="img-fluid" src="{{ page.media[page.header.icon].resize(48,48).url }}" alt="{{ page.title }}">
</a>
{% endif %}
......
......@@ -22,7 +22,7 @@
'border-right text-right border-top', 'border-left border-top'] %}
{% endswitch %}
<a href="{{ page.redirect ?: page.url }}" class="{{ item_image_link_classes ?: 'card-image text-decoration-none' }}">
<a href="{{ page.redirect ?: page.header.link ?: page.url }}" class="{{ item_image_link_classes ?: 'card-image text-decoration-none' }}">
<div class="card-img-grid text-left">
{% set count = page.collection|length == 4 ? 4 : 3 %}
{% for example in page.collection[:count] %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment