{{# Set defaults for variables #}} {{ this_link = (this_link ?: "") }} {{ target = (target ?: "_self") }} {{# Sort out the link and target for the button #}} {{ if (button_link_type == "url") }} {{ this_link = "{{ link }}" }} {{ elseif (button_link_type == "collection") }} {{ this_link = "{{ page_story:url }}" }} {{ elseif (button_link_type == "download") }} {{ this_link = "{{ download }}" }} {{ target = "_blank" }} {{ /if }} {{# Sort out the color for the button #}} {{ if (color === "#FFFFFF") }} {{ button_color = "white" }} {{ elseif (color === "#1D1D1D") }} {{ button_color = "black" }} {{ elseif (color === "#004F59") }} {{ button_color = "teal" }} {{ else }} {{ button_color = "orange" }} {{ /if }}