Template operator to create absolute URLs

Author Message

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

Eirik Alfstad Johansen

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!

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Paul Borgermans

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

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

Eirik Alfstad Johansen

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!

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 04:38:44
Script start
Timing: Jan 19 2025 04:38:44
Module start 'layout'
Timing: Jan 19 2025 04:38:44
Module start 'content'
Timing: Jan 19 2025 04:38:45
Module end 'content'
Timing: Jan 19 2025 04:38:45
Script end

Main resources:

Total runtime1.1106 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.2891152.6406
Module start 'layout' 0.00460.0028 741.929739.4766
Module start 'content' 0.00741.1017 781.4063563.4297
Module end 'content' 1.10910.0014 1,344.835916.1250
Script end 1.1106  1,360.9609 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00310.2782160.0002
Check MTime0.00120.1115160.0001
Mysql Total
Database connection0.00050.048810.0005
Mysqli_queries1.044594.0463630.0166
Looping result0.00060.0517610.0000
Template Total1.081797.420.5409
Template load0.00220.201720.0011
Template processing1.079597.192920.5397
Template load and register function0.00020.013810.0002
states
state_id_array0.00080.075110.0008
state_identifier_array0.00120.106620.0006
Override
Cache load0.00190.1689270.0001
Sytem overhead
Fetch class attribute can translate value0.00060.058320.0003
Fetch class attribute name0.00090.083470.0001
XML
Image XML parsing0.00090.084420.0005
class_abstraction
Instantiating content class attribute0.00000.0020100.0000
General
dbfile0.00100.0888230.0000
String conversion0.00000.000840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs