Your Rating: |
![]() ![]() ![]() ![]() ![]() |
Results: |
![]() ![]() ![]() ![]() ![]() |
94 | rates |
Implemented in Magnolia 5.0
Improve link generation
With moving to Magnolia 5.0 we can continue with getting rid of old Context/Node Data API replacing it with JCR API, in this case for link generation.
Also this brings an opportunity to refactor the code and its structure, get rid of deprecated code etc. + solving few related tickets (described bellow).
Structure and configuration changes
info.magnolia.link.LinkFactory
should be merged intoinfo.magnolia.link.LinkUtil
- both contains just static methods so there is no point in having two of them
- review methods
- also they make mutual calls
- Rewrite LinkTransformerManager
- only way how to customize one of link transformers is to rewrite the class (Link manager can be set in config workspace)
/server/rendering/linkManagemet
- addtransformers
holder where transformers will be registeredtransformers
absolute
relative
editor
completeURL
browser
- call registered transformer (as manager does it now), if not then fallback to default
(?)
- LinkTransformer interface - add setter and getter for addContextPath, useURI2RepositoryMapping and useI18N
EditorLinkTransformer
should be deprecated as it calls justAbsolutePathTransformer
- also this setting should be possible to configure site-specific
- implementation in
ETKLinkTransformerManager
- site will get also transformers holder
- if current site has this holder it overrides general one
- implementation in
Functional changes
- info.magnolia.link.Link - replace Content with Node
- add methods which will use Node, deprecate Content related
- i18n aware links
- for now internal links are working in set locale (EN -> EN)
Link
should contain Locale property with possibility to point to certain language version, for example:- link to german page from english
- link list of all existing languages for certain page
- use default locale if none given
- add
i18nLinkTransformer
Locale
set in constructor, transform method will do processing- based on functionality of
DomainNamePathTransformer
, just locale won't be added dynamically but via parameter
- configurable extension
MagnoliaTemplatingUtilities.createLink()
- add method with extension parameter
Jira tickets
- - base ticket for API change
- - API improvement, basicly refactoring and merging LinkUtil with LinkFactory as mentioned above
- should provide a way to configure Transformers
- improved configuration- - add possibility to configure extension when creating the link
Overview
Content Tools
Apps
Activity