Tel

Free!
Download
Tel
Description

Convert formatted phone numbers into a valid href "tel" string.

This modifier will convert a nicely formatted phone number into a numbers-only string, allowing usage inside an href.

It will convert any + symbols into 00 (for international numbers), remove (0) if it exists, and then remove all remaining non-numerical characters.

Usage

Setup:

Simply copy the Tel folder into site/addons/.

Simple Example:

// Saved data
company_phone: 123-456-789

// Usage inside template
{{ company_phone | tel }}

// Output
123456789

Real Life Example:

// Saved data
company_phone: +31 (0) 612 345 678

// Usage inside template
<p>Call Us: <a href="tel:{{ company_phone | tel }}">{{ company_phone }}</a></p>

// Output
<p>Call Us: <a href="tel:0031612345678">+31 (0) 612 345 678</a></p>

Important Links
Details
Released March 19, 2018
Updated 11 months ago
Version v1.1
Downloads 312
Requires Statamic 2

Aryeh Raber

More by Aryeh Raber

Similar Addons

See All
Filter tag pairs by expiration date

Expires On

by Becky Soll in Modifier
Filter tag pairs by expiration date
Extends the default Bard (MediumEditor) anchor functionality with internal links selection.

Anchor Extension

by Frederik Sauer in Enhancement, Modifier
Extends the default Bard (MediumEditor) anchor functionality with internal links selection.
A modifier to count the number of sets (by type) within a bard field.

Set Count

by Becky Soll in Modifier
A modifier to count the number of sets (by type) within a bard field.