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 1 year ago
Version v1.1
Downloads 466
Requires Statamic 2

Aryeh Raber

More by Aryeh Raber

Similar Addons

See All
Modifier to output a number as a currency

Currency

by Erin Dalzell in Modifier
Modifier to output a number as a currency
Autolinks content wrapped in [braces], just like a wiki.

Wikilinks

by Statamic in Modifier
Autolinks content wrapped in [braces], just like a wiki.
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.