urlThe url type is basically a more fancy version of the basic
string type but it performs a basic validation in the
admin UI of being a URL.  In addition to that, it gives access to parts
of the URL for better displaying.
Within templates the URL can be rendered as such, but it also has a few other attributes that are useful:
| Attribute | Description | 
|---|---|
| url | The URL is a basic string for further manipulation | 
| host | Just the host portion of the URL. | 
| port | Just the port of the URL. | 
| path | The path of the URL | 
| query | The query string of the URL | 
| fragment | The part after the hash symbol ( #) in the URL | 
| scheme | The URL schema ( httpetc.) | 
| ascii_url | Same as urlbut guaranteed to be ASCII only | 
| ascii_host | Same as hostbut guaranteed to be ASCII only | 
[fields.website]
label = Website
type = url
<a href="{{ this.url }}">{{ this.url.host }}</a>
Comments