I’ve used below code to make sure that I can bold text in one of my dynamic tabs however I want it to apply to all tabs, not just the ‘critics review’ tab.
I’ve placed it in the main product liquid section and replaced the block.settings.content for the code below. (Using dawn theme)
What could I change in the top line to make it apply to all tabs?
Thanks!
{% if block.settings.heading contains 'CRITIC' %}
{% assign beatles = block.settings.content | split: "|" %}
{% for member in beatles %}
{% assign value = forloop.index | modulo:2 %}
{% if value != 0 %}
{{ member }}<b>
{% else %}
{{ member }}
</b> {% endif %}
{% endfor %}
{% else %}
{{ block.settings.content }}
{% endif %}
Your current code applies bold formatting only when the tab’s heading contains “CRITIC”. To make it apply to all tabs, simply remove the {% if block.settings.heading contains ‘CRITIC’ %} condition so that it runs for every tab. Here’s the updated code:
{% assign beatles = block.settings.content | split: "|" %}
{% for member in beatles %}
{% assign value = forloop.index | modulo:2 %}
{% if value != 0 %}
{{ member }}<b>
{% else %}
{{ member }}</b>
{% endif %}
{% endfor %}