Version: v0.7.0 - Beta.  We welcome contributors & feedback.

Url

Methods for URL objects.

You can construct a URL object with a url TypeString:

$profile = url'/user/profile'

$profile.link('Profile')
//= <a href="/user/profile">Profile</a>

You can get the current relative page URL with url'this'.

$thisPage = url'this'
//= e.g. 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'

Methods

Relative/Absolute

Render

Parts

Query