Using Getdomain

Getdomain filter can be used with 4 different parameters.

  • full
  • long
  • normal
  • short default

Input:

{% set url = "https://www.domain.com:1234/index.html?param" %}
{{ url | getdomain(full) }}
{{ url | getdomain(long) }}
{{ url | getdomain(normal) }}
{{ url | getdomain }}

Output:

https://www.domain.com:1234
https://www.domain.com
www.domain.com
domain.com
Installation Instructions

To install this plugin, copy the command above to your terminal.

Active Installs
2
Version
1.0.3
License
MIT
Compatibility
Craft 3
Last release
June 12, 2019