wv-active-page-equals
Purpose
This tag helper sets an active
class to the element, if the current ViewContext.RouteData.Values["page"].ToString().ToLowerInvariant()
, regexed equals the string from asp-page
attribute(trimmed, lowercased). If no asp-page
attribute present, href
is similarly checked.
Properties
name | description |
---|---|
wv-active-page-equals |
html target: object type: default value: is required: Just the attribute is required. It has no value needed. |
asp-page or href |
html target: object type: default value: is required: This attribute is required to be present. If not |
Example
<a wv-active-page-equals asp-page='/dev/base-plugin/api/index'>Api Index Page</a>
<a wv-active-page-equals href='/dev/base-plugin/api/index'>Api Index Page</a>