Forums / Developer / Full URL for an attached file on the text editor
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
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...
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
Tuesday 11 January 2011 7:41:11 am
thank you !