close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

How to stop path from Templates when setting anchors programmatically in templates?

Thread began 4/28/2020 8:16 pm by Steve | Last modified 4/29/2020 5:57 pm by Ray Borduin | 30 views | 6 replies |

Steve

How to stop path from Templates when setting anchors programmatically in templates?

I'm trying to implement a dynamic telephone link within a template. It does not work as it somehow forces the templating path.

For instance, I can not resolve the following: <a href="Templates/tel:+16606465978">(660) 646-5978</a> <- Notice how "Templates/" is showing in the href attribute?

<?php
$phoneNumber = '(218) 829-3278';
?>
<!-- $tellink -->
<?php
$pattern = array();
$pattern[0] = '(';
$pattern[1] = ')';
$pattern[2] = '-';
$pattern[3] = ' ';
$telLink = str_replace($pattern, '', $phoneNumber);
$fullTelLink = '<a href="tel:+1'.$telLink.'">'.$phoneNumber.'</a>';
?>
<?php echo $fullTelLink; ?>



Demo page using this code:
https://brainerd.isemanhomes.com/test.php

Now if we try to do the same in the Template, we get the addition of the unwanted path. For instance, this is the code in the actual Template which uses a dynamic value similar to the test page:

<!-- $tellink -->
<?php
$pattern = array();
$pattern[0] = '(';
$pattern[1] = ')';
$pattern[2] = '-';
$pattern[3] = ' ';
$telLink = str_replace($pattern, '', $markerTele->getColumnVal("tel"));
$phoneLink = '<a href="tel:+1'.$telLink.'">'.$markerTele->getColumnVal("tel").'</a>'; ?>

<!-- / $tellink <?php echo $phoneLink; ?> -->

<?php echo($markerTele->getColumnVal("tel")); ?>



The problem can be seen in the comment shown on this test2 page and attached screenshot:
https://brainerd.isemanhomes.com/test2.php

Sign in to reply to this post

Ray BorduinWebAssist

This should be fixed in the latest versions of the framework include file. I've attached the file you can replace that should resolve this issue.

Attached Files
framework.php
Sign in to reply to this post
Did this help? Tips are appreciated...

Steve

Thanks Ray, that worked!

Have you considered creating the means to know when there are updates and which version is currently live? For instance, the website says
Latest release: June 14, 2019 (Version: 2.3.5)

All my local copies of framework.php are version 2.02 rather than 2.06 as you supplied. Am I doing something wrong as I don't have the latest framework file but have updated any time I've know of a version release?

Sign in to reply to this post

Steve

Ray, I just deleted the framework.php file in my current project. I then created a new theme based page that deposited a new framework.php file in the project. Unfortunately, it created a 2.02 framework file rather than a 2.06.

I'm also running Databridge 2.3.5

Sign in to reply to this post

Steve

I downloaded and installed 2.3.5 of Databridge which now uses framework.php version 2.04 which looks to cover the change needed to sort the issue I found. 2.06 seems to be a release candidate with other subtle changes?

Sign in to reply to this post

Ray BorduinWebAssist

I've updated the extension on the site and I've updated the release date. If you reinstall it should have the latest version.

Sign in to reply to this post
Did this help? Tips are appreciated...

Steve

Yes, confirmed... Thanks Ray!

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...