{% for card in cards %} {% comment %} extract card properties (AoH) ------------------------------------------------------------ {% endcomment %} {% for items in card %} {% for item in items[1] %} {% assign key = item[0] %} {% assign value = item[1] %} {% if key == 'enabled' %} {% assign card_enabled = value %} {% endif %} {% if key == 'recommended' %} {% assign plan_recommended = value %} {% endif %} {% if key == 'name' %} {% assign card_title = value | strip_newlines%} {% endif %} {% if key == 'name_translate' %} {% assign card_title_translate = value %} {% endif %} {% if key == 'price' %} {% assign price = value %} {% endif %} {% if key == 'benefits' %} {% assign benefits = value %} {% endif %} {% if key == 'disbenefits' %} {% assign disbenefits = value %} {% endif %} {% if key == 'buttons' %} {% assign card_buttons = value %} {% endif %} {% endfor %} {% endfor %} {% assign col_size = 12|divided_by:card_items %} {% comment %} extract sponsor link from button data (HoH) ------------------------------------------------------------ {% endcomment %} {% for items in card_buttons %} {% for item in items %} {% if item[0] == 'href' %} {% for elm in item[1] %} {% assign key = elm[0] %} {% assign value = elm[1] %} {% if key == 'tier_id' %} {% if elm[1] contains 'plan_details_page' %} {% assign sponsor_link = plan_details_page %} {% else %} {% capture sponsor_link %}{{provider_url}}/{{panel_options.account}}/sponsorships?tier_id={{elm[1]}}{% endcapture %} {% endif %} {% endif %} {% endfor %} {% endif %} {% endfor %} {% endfor %} {% if card_enabled %}
{% if plan_recommended %} {% endif %} {% endfor %}
{% comment %} END cards -------------------------------------------------------------------- {% endcomment %}