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 3 years ago
Version 1.1
Downloads 647
Requires Statamic 2

Aryeh Raber

More by Aryeh Raber

Similar Addons

See All
Automatically create responsive images

Responsive Images

by Spatie in Modifier
Automatically create responsive images
Filter tag pairs by expiration date

Expires On

by Becky Soll in Modifier
Filter tag pairs by expiration date
Searches occurences of files and replaces them as listed in the manifest

AssetManifest

by Mintel.me in Modifier
Searches occurences of files and replaces them as listed in the manifest
A tag pair to turn those replicator and bard sets into friendly neighbors, able to retrieve the type (or other field) from the next or previous set. Hidey ho!

Neighbors

by Becky Soll in Modifier
A tag pair to turn those replicator and bard sets into friendly neighbors, able to retrieve the type (or other field) from the next or previous set. Hidey ho!