The route tag renders a named route url at the place of declaration.
Parameter
The tag requires a valid route name as it's parameter.
Option Key Value Pairs
If the route requires values for generating route, they should be passed as key value pairs to the tag. In addition the following key value pairs can also be passed.
Key | Value |
---|---|
absolute | If you wish to generate absolute url instead of relative, include this key with value set to true . |
Example
{% route "Login" %}
- Renders the value /login
{% route "ReviewEditor" productId="2" reviewId="0" %}
- Renders the value /reviews/2/0
{% route "api_ProductsPage" %}
- Renders the value /api/products