Hi Matteo,
 
yes, we are using something like:
<a href="<%= MgnlContext.getContextPath()  
%>${your-context-unaware-path}">...</a>
 
when the dialog has a seperate field where the user can choose the image.
 
But when the image is added via the FCKEditor I get the whole HTML content 
within the node content (not just the image path). For example:
this is some text and HTML code<img 
src="/path/to/someimage/0/body_files/demo.jpg" />more HTML code or text
 
Maybe there is some Magnolia method to get content created by the FCKEditor 
which parses the node content and adds the contextPath?
 
Cheers,
Michael

>>> Matteo Pelucco <[email protected]> schrieb am 27.08.2009 um 09:31:

Michael Heigl ha scritto:
> Hi,

Hi Michael,

> we are using Magnolia 3.6.3 and have the following setup:
> 
> Author: http://[someurl]/author/ 
> Public: http://[someurl]/ 
> 
> When we insert an image or flash using the FCKEditor it stores the path to 
> the image/flash withouth the context path (in this case without the 
> "/author/") in the repository (e.g. /path/to/file/demoimage.jpg). I guess 
> this is desired behaviour.

It is more than a "desired behaviour". It is the exact way-of-doing when 
working with repositories.

> But when viewing or editing the content in the author instance the 
> images/flash don't show because of the missing "/author/". So it trys to load 
> /path/to/file/demoimage.jpg instead of the correct path 
> /author/path/to/demoimage.jpg

I can imagine you try to "print" a link or include an image e.g.: in a 
<img src="*" /> omitting the Magnolia context path.
You can (better, you should!) use something like this (for JSP):

<a href="<%= MgnlContext.getContextPath() 
%>${your-context-unaware-path}">...</a>

In this case you can move your templates over different instances 
without breaking them.

I suggest to make this context path available to all the pages, maybe 
including a head.jsp or a generic TemplateRenderer that expose it to JSTL.

I hope to have understood your problem..
HTH,
Matteo


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html 
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to