Skip to content

Craft CMS Twig filter to turn a UK telephone number into a link with the tel: URL scheme

License

Notifications You must be signed in to change notification settings

antcooper/telephonelink

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Telephone Link Twig filter

Convert a plain text phone number to one that can be used as a link. Assumes numbers starting with 0 are UK based.

Example

<a href='{{ globals.telephone|telephoneLink }}'>{{ globals.telephone }}</a>

Outputs

<a href='tel:+441555123456'>01555 123456</a>

Changelog

1.0

  • Initial release

About

Craft CMS Twig filter to turn a UK telephone number into a link with the tel: URL scheme

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages