Forums / Developer / Full URL for an attached file on the text editor

Full URL for an attached file on the text editor

Author Message

Ahmed Arous

Tuesday 11 January 2011 3:25:51 am

Hello,

When i want to attach a file using "Insert Object" on the text editor, it generate a link with relative URL ( <a href="/content/download/7330/78358/file/file.pdf"> ) but i need it to be a full URL ( <a href="http://mysite.com/content/download/7330/78358/file/file.pdf"> )

Is that possible ?

Gaetano Giunta

Tuesday 11 January 2011 5:09:58 am

You should be able to override the template used to display that link.

Iirc (but you should check it) it is: .../templates/content/view/embed.tpl or .../templates/content/view/embed-inline.tpl

Where it says {$object.main_node.url_alias|ezurl} put {$object.main_node.url_alias|ezurl(no, full)}

Principal Consultant International Business
Member of the Community Project Board

Gaetano Giunta

Tuesday 11 January 2011 5:10:39 am

ps: if this is because the link is present in an html email sent by eZP, the correct fix should be different...

Principal Consultant International Business
Member of the Community Project Board

Ahmed Arous

Tuesday 11 January 2011 5:39:10 am

thank you Gaetano Giunta,

the link is present in an html email, so how should i fix it ?

Bertrand Dunogier

Tuesday 11 January 2011 7:13:23 am

You need to prepend the file's URL |ezurl returns with the protocol (http or https) and the hostname.

Bertrand Dunogier
eZ Systems Engineering, Lyon
http://twitter.com/bdunogier
http://gplus.to/BertrandDunogier

Ahmed Arous

Tuesday 11 January 2011 7:41:11 am

thank you !

eZ debug

Timing: Jan 30 2025 19:37:46
Script start
Timing: Jan 30 2025 19:37:46
Module start 'content'
Timing: Jan 30 2025 19:37:46
Module end 'content'
Timing: Jan 30 2025 19:37:47
Script end

Main resources:

Total runtime0.3677 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0110 588.0625370.2813
Module start 'content' 0.01100.0131 958.34381,005.5000
Module end 'content' 0.02410.3435 1,963.84383,893.6484
Script end 0.3677  5,857.4922 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00491.3193200.0002
Check MTime0.00150.3964200.0001
Mysql Total
Database connection0.00100.264610.0010
Mysqli_queries0.258070.15191410.0018
Looping result0.00170.46661390.0000
Template Total0.343193.310.3431
Template load0.00080.228710.0008
Template processing0.342293.071210.3422
Override
Cache load0.00060.154410.0006
Sytem overhead
Fetch class attribute can translate value0.00210.581710.0021
XML
Image XML parsing0.00030.083810.0003
General
dbfile0.01113.0149200.0006
String conversion0.00000.001930.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs