by liu duo
Returns true if the link object is active, or false if the link object is inactive.
A link is considered active if the resource it points to is part of the URL structure. For example, if the current page is /blogs/news/snowfall, then the following links are active:
- /blogs/news, where the resource is the blog
- /blogs/news/snowfall, where the resource is the blog article
Given the behavior of link.active, multiple links in a menu can have link.active be true at the same time, even when they have different values for link.url.
If you're on a collection page that's filtered with tags, then a link that points to the unfiltered collection page still returns true for link.active. For example, if the URL is collections/men/boots, then the following links are active: