Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

image-20250108-091816.pngimage-20250108-091340.png

Info

If you would like the filter to display a month name such as October instead of 10 then you can add code to the Name Display pattern of the list that is linked to your Month tagbox in this example. You will need to adjust this for multiple languages if required, or to only filter for e.g those List Items that have Month in the broader field so that you are sure to get a correct display.

Code Block
{% assign month_names = "January,February,March,April,May,June,July,August,September,October,November,December" | split: "," %}

{% assign keyword_name = data.keyword.name | translate %}
{% assign state = data.keyword.state.name["x-default"] %}

{% assign is_number = keyword_name | plus: 0 %}

{% if data.keyword.broader %}
    {% assign broader_tags = data.keyword.broader | tagbox_name %}
    {% if broader_tags contains "Month" %}
        {% if is_number >= 1 and is_number <= 12 %}
            {% assign counter = 0 %}
            {% for month in month_names %}
                {% assign counter = counter | plus: 1 %}
                {% if counter == is_number %}
                    {% assign keyword_name = month %}
                {% endif %}
            {% endfor %}
        {% endif %}
    {% endif %}
{% endif %}

{{ keyword_name }}

{% if state != 'Active' %}  ¬{% endif %}

image-20250108-102151.pngImage Added