Url
Methods for URL objects.
You can construct a URL object with a url TypeString:
$profile = url'/user/profile'
$profile.toLink('Profile')
//= <a href="/user/profile">Profile</a>
You can get the current relative page URL with url'this'.
$thisPage = url'this'
//= Ex: url'/posts'
$nextPageUrl = $thisPage.setQuery({ page: 2 })
// url'/posts?page=2'
To get the full current page URL, call Request.getUrl().
$fullUrl = Request.getUrl() //= url'https://mysite.com/posts?page=2'