Getdomain


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

Free

Package Name

To install this plugin, search for its package name on the Plugin Store and click “Install”.


Information

  • Version 1.0.3
  • Last Update 6/12/2019
  • Active Installs 2
  • Compatibility Craft 3
  • License MIT
  • Categories Templating, Development

Report an issue