Attribute
The Attribute object represents a single name and value pair for a link with attributes in the storefront.
classDiagram
direction LR
class Attribute{
string name
?string value
}
Properties
| Attribute name |
Type |
Description |
| name |
string |
Name of attribute. |
| value |
null|string |
Value for attribute. |
Property Examples
name property
value property
Usage examples
source<link rel="canonical" href="https://shoper.pl" {% if attribute.value %}{{ attribute.name }}="{{ attribute.value }}"{% else %}{{ attribute.name }}{% endif %}/>
output<link rel="canonical" href="https://shoper.pl" title="Strona główna"/>