[MGNLSTK-1162] multisite: expose a method to create link prefixes Created: 04/Jun/10  Updated: 16/Dec/14  Resolved: 29/May/13

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0.10

Type: Improvement Priority: Major
Reporter: Philipp Bärfuss Assignee: Jaroslav Simak
Resolution: Fixed Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
is cloned by MGNLETK-99 CLONE - multisite: expose a method to... Closed
relation
is related to MGNLSTK-636 resources: the old /stk-resouces/site... Closed
is related to MAGNOLIA-6021 SiteManager.getLinkPrefix(Node) is si... Closed
Template:
Acceptance criteria:
Empty
Date of First Response:

 Description   

The mechanism introduced to guarantee the site detection (MGNLETK-27) is rather complex. To create correct link prefixes we have to expose such a method on the site manager. It currently works nicely for content because the link-transformer-manger is used but as soon you want to create links to resources one has to build the links manually which is not so easy if one wants to support all use-cases.



 Comments   
Comment by Jan Haderka [ 01/Oct/12 ]

While fixing this issue, review ALL code changes made for MGNLSTK-363 and re-fix as appropriate.

Comment by Zdenek Skodik [ 28/Mar/13 ]

IMHO we should not create localized link prefixes to resources when they still target the same css for instance, serve the same contents. The localized pattern should be removed from the linkPrefix.

Comment by Jan Haderka [ 23/May/13 ]

STKSiteManager

+    public String getLinkPrefix(Node currentSite) {

Either it is link to current site ( the one currently available in the context, in which case you don't need to pass site root node as a param, or it is link to any page in which case is the param name confusing.

Comment by Jan Haderka [ 23/May/13 ]

Also inside of the method you call link util which will in turn call site manager ... This is unnecessarily complicated and would be a hell to debug later. Either you can get what you want w/o the round trip via link util, or. Maybe it is a clue that this method belongs there and not to site manager.

Comment by Jan Haderka [ 23/May/13 ]

See comments above

Comment by Jaroslav Simak [ 29/May/13 ]

resolved in related MGNLETK-99

Generated at Mon Feb 12 07:33:57 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.