[MGNLSTK-623] Review all places where links are generated in STK Created: 14/May/10  Updated: 23/Jan/13  Resolved: 07/Jun/10

Status: Closed
Project: Magnolia Standard Templating Kit (closed)
Component/s: base system, paragraphs
Affects Version/s: 1.3
Fix Version/s: 1.3.1

Type: Task Priority: Major
Reporter: Jan Haderka Assignee: Philipp Bärfuss
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
relation
is related to MGNLCAT-18 don't construct links based on the cu... Closed
is related to MGNLETK-27 Multi site support and virtualURIMapp... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:

 Description   

Quite few models in STK generate links to content directly instead of using LinkUtil/LinkManager. This is then cause of issues when URLs are altered by system (e.g. when using multisite support).
All the links in models should be generated only using appropriate LinkUtil methods.
This is specially true for overview paragraphs such as NewsOverview and EventsOverview, but also for pagination ( pager.ftl macro and related pager objects).



 Comments   
Comment by Jan Haderka [ 03/Jun/10 ]

Reviewed all templates and associated models. Reviewed items listed below.

stk.getAssetLink() => mgnl.createLink() || imaging.createLink()
stk.getImageLink() => mgnl.createLink() || imaging.createLink()
stk.getAssetVariation.link => variation.createLink()
imaging.createLink => mgnl.createLink() || variation.createLink()
variation.createLink => VariationImpl, ImageOperationProvidingVariation .createLink()
mgnl.createLink => LinkUtil.createLink()

flash.model.link => stk.getAssetLink

calendar.item.link => model.eventLink || model.dateEventLink
calendar.model.getEventLink => LinkUtil.createAbsoluteLink() mgnl.createLink()
calendar.model.getDateEventLink => LinkUtil.createAbsoluteLink() mgnl.createLink()

eventOverview.model.prevLink => eventOverview.model.link.href
eventOverview.model.nextLink => eventOverview.model.link.href
eventOverview.model.link.href => mgnl.createLink() !! expects links to end with .html!!

searchResult.item.link => mgnl.createLink()
searchResult.model.searchPageLink => STKTemplateModel.getSearchPageLink()
STKTemplateModel.getSearchPageLink() => mgnl.createLink()

image.link=>STK.getAsset().getLink()

downloadLink.model.link => mgnl.createLink()

externalLink.model.link => STKUtil.getExternalLink()

internalLink.model.link => mgnl.createLink()

pagination.pager.getPageLink() => parses current page link
AbstractItemListModel.pager => mgnl.createLink
CategoryOverviewModel.pager => manually combine link from context path and currentURI

stageXL.model.teaserLink => AbstractTeaserModel.teaserLink
AbstractTeaserModel.teaserLink => mgnl.createLink()
stageXL.model.image.link => ImageModel.image => stk.getImageLink()

carouselItem.teaserLink => AbstractTeaserModel.teaserLink

downloadFile.model.teaserLink => AbstractTeaserModel.teaserLink
eventList.model.allEventsLink => mgnl.createLink()
externalPage.model.teaserLink => stk.externalLink()
fingerTabbedItem.model.teaserLink => AbstractTeaserModel.teaserLink
internalPage.model.teaserLink => AbstractTeaserModel.teaserLink
newsList.model.allNewsLink => mgnl.createLink()
stkTeaserSingleFeed.item.link => link from the feed
syndicate.model.link=>manually assemble virtual URI, which is OK since the Virtual URI will be the same no matter which site and domain is used.
infoblock.model.externalLink => mgnl.createLink()
branding.model.logoImageLink => stk.assetLink
branding.model.printLogoImageLink => stk.assetLink
branding.model.searchPageLink => mgnl.createLink()
branding.model.homeLink => mgnl.createLink()
htmlHeader.cssFile.link => Resource.getLink()
htmlHeader.jsFile.link => Resource.getLink()
Resource.getLink() => manually combine context path with stk-resources prefix with site name and link
mainAreaIntro.model.getCategoryLink => CategorizationSupport.categoryLink
CategorizationSupport.categoryLink => CategoryUtil.categoryLink
CategoryUtil.categoryLink => manualy combine context path and handle to category with name
mainAreaIntro.imageModel.image.link => imaging.createLink()
@cms.links => manually assembles path from context and path to the script

Items in read are either questionable or wrong.

Comment by Philipp Bärfuss [ 07/Jun/10 ]

We went through the use cases marked as read. New tickets will have to be added if we find more issues.

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