Skip to content

Commit

Permalink
fix generating telephone link
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyborn committed Aug 31, 2023
1 parent eb1d092 commit 379572b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Resources/contao/classes/StoreLocator.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ public static function parseStoreData( StoresModel $store, ?Module $module=null

// create a clickable link for telephone number
if( !empty($store->phone) ) {
$store->phoneLink = 'tel://'.preg_replace("|[^\+0-9]|", "", $store->phone);
$store->phoneLink = 'tel:'.preg_replace("|[^\+0-9]|", "", $store->phone);
}

// create a clickable link for fax number
if( !empty($store->fax) ) {
$store->faxLink = 'fax:'.preg_replace("|[^\+0-9]|", "", $store->fax);
}

// create a "pretty" url
Expand Down

0 comments on commit 379572b

Please sign in to comment.