Implemented in 4.0
Page describes the problem prior to resolution
Magnolia 3 has a semi centralized mechanism to resolve links. Unfortunately it is not easy to use it to resolve single links because it has been written to transform content written by the fck editor.
Goal
- it should be easy to create links when you have
- a node
- a nodedata (binaries)
- a uuid and repository name
- this is used to
- create links in templates
- process fck editor content based on the uuid patterns (out tag, content wrapper)
- it must be configurable (similar to what we have today:
/server/rendering/linkResolver)
Status / Problems
info.magnolia.cms.link.LinkResolverprovides only methods to transform content strings with uuid links
- in many places we instantiate a link transformer while we should use a centralized mechanism
info.magnolia.freemarker.MagnoliaObjectWrapper114 & 116info.magnolia.cms.link.LinkHelper.convertUUIDtoURI(String, String)
- messy
info.magnolia.cms.util.LinkUtilandinfo.magnolia.cms.link.LinkHelper** deprecated methods- confusing names
- missing methods to transform a node or a nodedata
Solution / Tasks
API
0%Task List
Utils
0%Task List
Overview
Content Tools
7 Comments
Jan Haderka
Re "drop
LinkResolver" task ... currently we have 3 classes doing quite similar things and in many cases calling each other internallyi.m.cms.link.LinkResolverImli.m.cms.link.LinkHelperi.m.cms.util.LinkUtilLinkResolveris nearly not used anywhere in our code, so I'll deprecate the whole interface and it's impl.LinkHelperandLinkUtilare used equally often in our code, sometimes even on one line of code:Since
LinkUtilis outside oflinkpackage, I would like to deprecate it as well and concentrate all usefull methods inLinkHelper. Any objections?Philipp Bracher
the original intention has been:
I hope this clarifies it a bit
Philipp Bracher
But yes, creating a single and useful util class is the goal
Magnolia International
info.magnolia.linkshould become the single point of entry for the new linking API.Jan Haderka
just
i.m.link? Are we dropping thecmsfrom any new code? In that case I will deprecate all code ini.m.cms.link.*and move relevant parts of the code to the new package.Jan Haderka
How about
URI2RepositoryManagerandURI2RepositoryMappingin {i.m.cms.beans.config}} package? Are they out of the scope for now or also part of the re-factoring?Philipp Bracher
I would like to keep them out of scope, except we have good reasons for.