Template directive: Domurl

The @domurl directive is used similar to the domurl() function which is being used to resolve local urls into http protocols. This makes it easier to link to static files such as images, css and javascript files easily. In order to import files, the full relative path must be supplied. This is shown below

domurl()
  <a href="@domurl('res/images/myimage.jpg')"> myimage </a>   
                
resolved as
  <a href="{domain}/res/images/myimage.jpg"> myimage </a> 
                
This directive also support http protocols as shown below:
  <head>
    <link href="@domurl('https://some-site.com/assets/css/site.css')" /> 
  </head> 
                
From the sample above, the url supplied will be returned in the way in which it was supplied. It is important to know that the @domurl() also keeps track of last relative url supplied. This feature is useful when working with the @inPath() and @isPath() directives.