Change category ID field case

Needed for beta 5
This commit is contained in:
Daniel J. Summers 2022-07-18 22:27:39 -04:00
parent c8d48079d3
commit 3eb6af0715
2 changed files with 33 additions and 35 deletions

View File

@ -42,7 +42,7 @@
<h4 class="item-heading">Series</h4>
{%- for series in series_details %}
{% assign parts = series | split: "," %}
{% assign cat = categories | where: "id", parts[0] | first %}
{% assign cat = categories | where: "Id", parts[0] | first %}
<h4 class="text-center">{{ cat.name }}</h4>
<p class="text-center">
<a href="{{ parts[2] | relative_link }}"
@ -61,7 +61,7 @@
<h4 class="text-center">Old Testament</h4>
<p class="text-center">
{%- assign cat_id = ot_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
See All
@ -73,7 +73,7 @@
{%- if first_time -%}
{%- assign first_time = false -%}
{%- else %}
{%- assign cat = categories | where: "id", cat_id | first -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<li>
{% if cat.post_count == 0 -%}
<span{% if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
@ -93,7 +93,7 @@
<h4 class="text-center">New Testament</h4>
<p class="text-center">
{%- assign cat_id = nt_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
See All
@ -105,7 +105,7 @@
{%- if first_time -%}
{%- assign first_time = false -%}
{%- else %}
{%- assign cat = categories | where: "id", cat_id | first -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<li>
{% if cat.post_count == 0 -%}
<span{% if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>

View File

@ -45,27 +45,26 @@
<ul>
<li>
{%- assign cat_id = ot_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
<ul>
{%- assign first_time = true -%}
{%- for cat_id in ot_books %}
{%- if first_time %}
{%- assign first_time = false -%}
{%- elsif post.category_ids contains cat_id %}
{% assign cat = categories | where: "id", cat_id | first %}
<li>
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
</li>
{%- endif %}
{%- unless forloop.first %}
{%- if post.category_ids contains cat_id %}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<li>
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
</li>
{% endif %}
{%- endunless %}
{%- endfor %}
</ul>
</li>
@ -75,27 +74,26 @@
<ul>
<li>
{%- assign cat_id = nt_books | first -%}
{%- assign cat = categories | where: "id", cat_id | first -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
<ul>
{%- assign first_time = true -%}
{%- for cat_id in nt_books %}
{%- if first_time %}
{%- assign first_time = false -%}
{%- elsif post.category_ids contains cat_id %}
{% assign cat = categories | where: "id", cat_id | first %}
<li>
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
</li>
{%- endif %}
{%- unless forloop.first %}
{%- if post.category_ids contains cat_id %}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<li>
<i class="fa fa-book" title="Book" aria-hidden="true"></i>
<a href="{{ cat | category_link }}"
{%- if cat.description %} title="{{ cat.description.value | escape_once }}"{% endif %}>
{{ cat.name }}
</a>
</li>
{%- endif %}
{%- endunless %}
{%- endfor %}
</ul>
</li>
@ -107,7 +105,7 @@
{%- for series_id in series_ids %}
{%- if post.category_ids contains series_id -%}
{%- assign in_series = true -%}
{%- assign series_cat = categories | where: "id", series_id | first -%}
{%- assign series_cat = categories | where: "Id", series_id | first -%}
{%- endif -%}
{%- endfor -%}
{%- if in_series %}
@ -131,7 +129,7 @@
<ul>
{%- for cat_id in post.category_ids %}
{% unless ot_books contains cat_id or nt_books contains cat_id or series_ids contains cat_id %}
{%- assign cat = categories | where: "id", cat_id | first -%}
{%- assign cat = categories | where: "Id", cat_id | first -%}
<li>
<i class="fa fa-folder-open-o" title="Category" aria-hidden="true"></i>
<a href="{{ cat | category_link }}" rel="tag" title="Categorized under {{ cat.name | escape }}">