Skip to content

Commit 831c2aa

Browse files
authored
Merge pull request #319 from ELIXIR-Belgium/tool-res-fix
Bugfix: No false positives with the tools and resources table
2 parents 4d54d72 + 4e4084e commit 831c2aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_includes/resource-table-all.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
{%- else %}
44
{%- assign tools = site.data.tool_and_resource_list | add_related_pages | sort_natural: "name" %}
55
{%- endif %}
6+
{%- assign tool_matches_total = 0 %}
67
{%- assign country_pages = site.pages | where_exp: "item", "item.search_exclude != true" | where_exp:"item","item.national_resources != nil" %}
78
{%- unless country_pages.size == 0 %}
8-
{%- assign tool_matches_total = 0 %}
99
{%- assign query = "related_pages." | append: page.type %}
1010
{%- for country_page in country_pages %}
1111
{%- if include.tag %}
1212
{%- assign tool_matches = country_page.national_resources | where_exp:"resource","resource.related_pages != nil" | where: query, include.tag %}
13-
{%- unless tool_matches.size == 0 %}
13+
{%- unless tool_matches.size == 0 %}
1414
{%- assign tool_matches_total = tool_matches_total | plus: tool_matches.size %}
1515
{%- endunless %}
1616
{%- else %}

0 commit comments

Comments
 (0)