Skip to content

Commit

Permalink
Merge pull request #319 from ELIXIR-Belgium/tool-res-fix
Browse files Browse the repository at this point in the history
Bugfix: No false positives with the tools and resources table
  • Loading branch information
bedroesb authored Jan 15, 2025
2 parents 4d54d72 + 4e4084e commit 831c2aa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _includes/resource-table-all.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
{%- else %}
{%- assign tools = site.data.tool_and_resource_list | add_related_pages | sort_natural: "name" %}
{%- endif %}
{%- assign tool_matches_total = 0 %}
{%- assign country_pages = site.pages | where_exp: "item", "item.search_exclude != true" | where_exp:"item","item.national_resources != nil" %}
{%- unless country_pages.size == 0 %}
{%- assign tool_matches_total = 0 %}
{%- assign query = "related_pages." | append: page.type %}
{%- for country_page in country_pages %}
{%- if include.tag %}
{%- assign tool_matches = country_page.national_resources | where_exp:"resource","resource.related_pages != nil" | where: query, include.tag %}
{%- unless tool_matches.size == 0 %}
{%- unless tool_matches.size == 0 %}
{%- assign tool_matches_total = tool_matches_total | plus: tool_matches.size %}
{%- endunless %}
{%- else %}
Expand Down

0 comments on commit 831c2aa

Please sign in to comment.