I only want to output the “www.domain.tld”-Part of the automatically rendered URL.
Is this possible?
Thanks for any answer!
This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.
The active forums are here.
December 12, 2011 4:43am
Subscribe [2]#1 / Dec 12, 2011 4:43am
I only want to output the “www.domain.tld”-Part of the automatically rendered URL.
Is this possible?
Thanks for any answer!
#2 / Dec 13, 2011 11:41am
Hi amadeus77,
Thanks for the question! There’s not currently a way to get EE to automatically turn URLs into links while only outputting the subdomain and domain name. Perhaps if there’s a good use case for it, it would make a good Feature Request. Could you provide some context for this? Why are you looking for EE to not output the protocol part of the URL?
#3 / Dec 14, 2011 3:07am
Why are you looking for EE to not output the protocol part of the URL?
hmmm… just because it looks much nicer?! Everybody knows the “Syntax” of an URL… so why always put out the “http://www.domain.tld” instead of just using “domain.tld” or at least “www.domain.tld”
I found a way! Activated PHP in Output-Mode. Then wrote this:
<?php echo(str_replace(‘http://’,’‘,’{varWithUrl}’)) ?>
Pretty easy 😊
#4 / Dec 19, 2011 3:25pm
Glad you were able to find a solution, amadeus77. Let me know if there’s anything else I can do to help.