{{ url.root }} – Website Root URI

Returns the root URI for the request.

Basic usage:

{{ url.root }}

Usage with parameters:

{{ url.root(Include Host, Add Trailing Slash) }}

Parameters:

  1. Include Host (optional) – Include Website protocol, host, port, etc.
    • (No – default)
    • includehost: Include
  2. Add Trailing Slash (optional) – Add common slash to the end of the host name. Example: https://example.com/
    • (Add – default)
    • notrailingslash: No

Example:

{{ url.root("includehost","notrailingslash") }}


What are your feelings

Leave a Reply

Updated on January 9, 2025