Attributes are available on FLEX that are tied to pages or products and have been marked as "Show on Website".
Attributes can be used for basic operational tags or output tags and they will start with "attr_".
For example, lets say we create a product attribute called "Material Typeâ€. The slug would likely be “attr_material_typeâ€, so to call it on a product page, you can call it by doing the following:
Example:
{attr_material_type}
Output:
Carbon Fiber
Adding _name
If you'd like to display the attribute name, simply add "_name" to the end of the attribute tag.
Example:
<em>{attribute_material_type_name}</em> : {attr_material_type}
Output:
<em>Material Type</em> : Carbon Fiber
Adding _value
There are senerios that you might want to maybe control your design by using an attribute. By adding "_value" to the end of an attribute tag, it will return the ID of a dropdown.
{% if attr_manual_section_value == 7 %} <h5 class="subheading">Test A</h5> {% elseif attr_manual_section_value = 19 %} <h5 class="subheading">Test B</h5> {% endif %}
This is only available on drop down attributes. Using value will ensure that if the name changes, the value will remain the same.