dmytro_ushatenko/themes/knowledge-base/templates/partials/relatedpages.html.twig

17 lines
631 B
Twig
Raw Normal View History

<ul class="related-pages">
{% for related_path, score in related_pages %}
{% set related = grav['pages'].get(related_path) %}
{% if related %}
{% if related.header.media == 'video' %}
<li class="video">
{% else %}
<li class="text">
{% endif %}
{% if config.plugins.relatedpages.show_score %}
<span class="score">{{ score }}</span>
{% endif %}
<a href="{{ related.url }}" title="{{ related.title }}">{{ related.title }}</a>
</li>
{% endif %}
{% endfor %}
</ul>