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

View File

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