Forums / Developer / Template operator to create absolute URLs
Eirik Alfstad Johansen
Wednesday 25 August 2004 3:21:10 am
Hi,
Is there a template operator I can use that creates absolute URLs (as apposed to relatives created by ezurl and ezroot)? Has anyone else done this?
Sincerely, Eirik Alfstad Johansen http://www.netmaking.no/
Paul Borgermans
Wednesday 25 August 2004 3:56:26 am
Hello,
No, but you can use existing operators to achieve the same (ezsys+ezurl). But you make me wonder why you would need to? Reverse proxies without dns tricks?
-paul
eZ Publish, eZ Find, Solr expert consulting and training http://twitter.com/paulborgermans
Wednesday 25 August 2004 5:30:23 am
Hi Paul,
The reason why I need to do this is because of an integration with paynet which makes use of a template built by eZPublish. Without absolute URLs, the paynet domain is used as the basis of links instead of our own.
Could you please give me a quick example as I can't get it to work. Thanks in advance!
Wednesday 25 August 2004 6:42:51 am
Eirik,
Something like this:
<a href="http://{ezsys(hostname)}/{$node.url_alias|ezurl(no)}">My link</a>
hth
Wednesday 25 August 2004 12:14:44 pm
Thanks a lot, Paul! That did the trick. I wasn't aware of the 'no' parameter for the ezurl operator which was partially the cause of my problem.
Thanks again!
Script start
Module start 'content'
Module end 'content'
Script end
Time used to render debug report: 0.0002 secs