wv-active-page-starts
Purpose
This tag helper sets an active
class to the element in the following case:
- if the current
ViewContext.RouteData.Values["page"].ToString().ToLowerInvariant()
, regexed starts with the string fromasp-page
attribute(trimmed, lowercased and page name removed); - if the current
ViewContext.HttpContext.Request.Path.ToString().ToLowerInvariant()
, regexed starts with the string fromhref
attribute(trimmed, lowercased and last node removed)
Properties
name | description |
---|---|
wv-active-page-starts |
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-starts asp-page='/dev/base-plugin/api/index'>Api Index Page</a>
<a wv-active-page-starts href='/dev/index'>Api Index Page</a>