1

I'm trying to use Low Replace to correct URLs in a standard text field in EE.

Sometimes the URL is inputted correctly, for example http://www.a-website.com other times they are inputted incorrectly ie www.another-website.com

I think I nearly have the solution, but the colon after http isn't being rendered on the page, so the corrected URL for the above example comes out as http//www.another-website.com. Please see my code below.

{exp:low_replace find="www." replace="http://www."}
    <p><a href="{website}" target="_blank">Website</a></p>
{/exp:low_replace}
2

A lot of people doesn't know, but EllisLab has a first party add-on for that:

<p><a href="{exp:valid_url}{website}{/exp:valid_url}" target="_blank">Website</a></p>

There's several first party add-ons available for download, despite not included on EECMS by default.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.