Hallo Christian!
If you're not using stk, then you don't have the "stk" object available in your
templates, so you can't use the decode() method. In this case you will have to
manually decode the strings before output.
Personally, I would define a transformLinks() method in a base model class, and
use that model class (or subclasses) for all my templates and paragraphs. The
contents of the transformLink() method would be something like the tip supplied
by Rakesh (included below).
Lg aus Wien,
Richard
You need to use the link transformer utility to convert these to the
appropriate links
String value = <from your node or content>
final AbsolutePathTransformer transformer =
LinkTransformerManager.getInstance().getAbsolute();
value = LinkUtil.convertLinksFromUUIDPattern( value, transformer );
Rakesh
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Christian Lohmann
Gesendet: Donnerstag, 10. März 2011 12:28
An: Magnolia User-List
Betreff: Re: AW: [magnolia-user] internal links in FCKEditor CE
Hi Richard,
thanks for telling me the the cause for this behavior. But now there's another
problem, i don't use the STK. Is there another way (another method) to solve
this problem?
LG aus Hamburg
Christian
Am 09.03.2011 um 17:14 schrieb Unger, Richard:
Hi Christian!
Are you processing your content using stk.decode() before outputting it in the
template?
==> ${stk.decode(content).myfield}
The example you show below is the way fckeditor stores the links in the raw
content.
That content needs to be decoded to give magnolia a chance to rewrite the links
correctly.
Why does fckeditor not insert the correct links in the first place, you may
ask...
1. Because sometimes content is included from a different context (eg
including content from site A in site B) - in this case the links should be
rendered so they are valid for site B, not site A.
2. Because you might move the content around within the dms. In this case
Magnolia will still find it by uuid, and render the links correctly. Otherwise
you would have to go back and edit each paragraph referring to the moved
content...
Lg aus Wien,
Richard
Von: [email protected]<mailto:[email protected]>
[mailto:[email protected]] Im Auftrag von Christian Lohmann
Gesendet: Mittwoch, 09. März 2011 16:38
An: Magnolia User-List
Betreff: [magnolia-user] internal links in FCKEditor CE
Hello Magnolia-Users,
i have a problem with setting internal links with the FCKEditor. When i try to
add a link to, for example the dms, i get following mutated link expression in
html:
<a
href="${link:{uuid:{8606dd0b-94fb-4d00-abea-6cb5e22a4323},repository:{dms},handle:{/Technical-information/FA-Stabilis_engl},nodeData:{},extension:{pdf}}}">Datenblatt</a>
How can i fix this to get well formed links out of it? Has anyone an idea?
Thanks in advance!
Christian
________________________________
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to:
<[email protected]<mailto:[email protected]>>
----------------------------------------------------------------
--
altocon GmbH
Gaußstraße 190 B
22765 Hamburg
Tel.: +49-40-29812097-0
Fax: +49-40-29812097-9
E-Mail: [email protected]<mailto:[email protected]>
Web: http://www.altocon.de<http://www.altocon.de/>
Sitz der Gesellschaft: Hamburg
AG Hamburg, HRB 104131
USt.-IdNr. DE 258127045
Geschäftsführer: Michael Trowe, Lutz Hühnken
________________________________
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to:
<[email protected]<mailto:[email protected]>>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------